Project

General

Profile

Actions

Feature #11476

closed

Methods defined in Refinements cannot be called via send

Added by matsuda (Akira Matsuda) over 8 years ago. Updated over 7 years ago.

Status:
Closed
Target version:
-
[ruby-core:<unknown>]

Description

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 `<main>': undefined method `b' for #<C:0x007f86c9a12af0> (NoMethodError)

Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Feature #12079: Loosening the condition for refinementRejectedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0