Project

General

Profile

Actions

Bug #11809

closed

method_missing should not be refined

Added by shugo (Shugo Maeda) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Target version:
-
[ruby-core:72080]

Description

The following code prints [:Refinement, :abc], but method_missing should not be refined because it's indirect call.

class Foo
end

module Bar
  refine Foo  do
    def method_missing(mid, *args)
      p [:Refinement, mid, *args]
    end
  end
end

using Bar

Foo.new.abc

Files

never_refine_method_missing.diff (1.25 KB) never_refine_method_missing.diff shugo (Shugo Maeda), 12/12/2015 03:01 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #11655: Can't refine Object.const_missingRejectedActions
Actions #1

Updated by shugo (Shugo Maeda) about 9 years ago

  • Status changed from Assigned to Closed

Applied in changeset r53060.


Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED

r53060 introduce behavior change between 2.2 and 2.3.
NEWS should be updated too.

Actions #3

Updated by ktsj (Kazuki Tsujimoto) almost 9 years ago

  • Related to Bug #11655: Can't refine Object.const_missing added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0