Reputation: 28790
I have a number of rake files that include a common module:
require 'rake'
module RakeCommon
include Rake::DSL
task :clean do
And in a rake file:
include RakeCommon
The problems is that after updating to rake 10.0.1, I get the following error:
undefined method `task' for RakeCommon:Module
Upvotes: 0
Views: 141
Reputation: 5081
Just like I stated in comment, but just checked it.
You should use extend
instead of include
in your module. Your code was working earlier, because Rake::DSL
module was extending Object
. Methods you were using were available in module no matter if you included or extended it properly. In 10.0 branch some deprecated things were removed, that's why it did not work.
Upvotes: 2