Project

General

Profile

Bug #11809 ยป never_refine_method_missing.diff

shugo (Shugo Maeda), 12/12/2015 03:01 PM

View differences:

test/ruby/test_refinement.rb
assert_equal([:R2_baz, [:R1_foo, :orig_foo]], MixedUsing2.f2)
end
module MethodMissing
class Foo
end
module Bar
refine Foo do
def method_missing(mid, *args)
"method_missing refined"
end
end
end
using Bar
def self.call_undefined_method
Foo.new.foo
end
end
def test_method_missing
assert_raise(NoMethodError) do
MethodMissing.call_undefined_method
end
end
private
def eval_using(mod, s)
vm_insnhelper.c
ci = &ci_entry;
cc_entry = *orig_cc;
cc_entry.me = rb_callable_method_entry(CLASS_OF(calling->recv), idMethodMissing);
cc_entry.me =
rb_callable_method_entry_without_refinements(CLASS_OF(calling->recv),
idMethodMissing);
cc = &cc_entry;
calling->argc = argc;
    (1-1/1)