brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.64k stars 114 forks source link

Sucker Punch breaks Module#singleton_class? method #231

Closed timcraft closed 3 years ago

timcraft commented 4 years ago

When active_support cannot be loaded the code in lib/sucker_punch/core_ext.rb will override the Module#singleton_class? method and change its visibility from public to private.

This breaks any code which calls that method, for example with zeitwerk:

/.../.gem/ruby/2.6.6/gems/zeitwerk-2.3.0/lib/zeitwerk/explicit_namespace.rb:62:in `tracepoint_class_callback': private method `singleton_class?' called for SuckerPunch::Counter::Busy:Class (NoMethodError)

Module#singleton_class? has existed since Ruby 2.1: https://github.com/ruby/ruby/commit/a25d02b144