From: shugo@... Date: 2015-08-29T14:22:47+00:00 Subject: [ruby-core:70631] [Ruby trunk - Feature #11476] [Assigned] Methods defined in Refinements cannot be called via send Issue #11476 has been updated by Shugo Maeda. Tracker changed from Bug to Feature Status changed from Open to Assigned Assignee changed from Shugo Maeda to Yukihiro Matsumoto It's an intended behavior that Kernel#send ignores refinements as described at https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/RefinementsSpec What do you think of it, Matz? ---------------------------------------- Feature #11476: Methods defined in Refinements cannot be called via send https://bugs.ruby-lang.org/issues/11476#change-54036 * Author: Akira Matsuda * Status: Assigned * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- ~~~ class C end module M refine C do def a() p:hello end def b() p:world end end end using M C.new.a C.new.send :b ~~~ ~~~ % ruby -v t.rb ruby 2.3.0dev (2015-08-22 trunk 51660) [x86_64-darwin14] :hello t.rb:13:in `
': undefined method `b' for # (NoMethodError) ~~~ -- https://bugs.ruby-lang.org/