diff --git a/lib/sidekiq/extensions/class_methods.rb b/lib/sidekiq/extensions/class_methods.rb index 67dd04d7..b3778d7d 100644 --- a/lib/sidekiq/extensions/class_methods.rb +++ b/lib/sidekiq/extensions/class_methods.rb @@ -30,4 +30,4 @@ module Sidekiq end end -Class.send(:include, Sidekiq::Extensions::Klass) +Module.send(:include, Sidekiq::Extensions::Klass) diff --git a/test/test_extensions.rb b/test/test_extensions.rb index 4ce60d10..a239d70d 100644 --- a/test/test_extensions.rb +++ b/test/test_extensions.rb @@ -63,5 +63,14 @@ class TestExtensions < MiniTest::Unit::TestCase it 'allows delay of any ole class method' do SomeClass.delay.doit(Date.today) end + + module SomeModule + def self.doit(arg) + end + end + + it 'allows delay of any module class method' do + SomeModule.delay.doit(Date.today) + end end end