Project

General

Profile

Bug #15720 » sse-unused-refinement.patch

jeremyevans0 (Jeremy Evans), 06/10/2019 10:56 PM

View differences:

test/ruby/test_refinement.rb
INPUT
end
def test_refining_module_repeatedly
bug15720 = '[ruby-core:91916] [Bug #15720]'
assert_in_out_err([], <<-INPUT, ["ok"], [], bug15720)
module M1
refine Kernel do
def foo
'foo called!'
end
end
end
module M2
refine Kernel do
def bar
'bar called!'
end
end
end
using M1
foo
begin
bar
rescue NameError
end
puts "ok"
INPUT
end
def test_super_from_refined_module
a = EnvUtil.labeled_module("A") do
def foo;"[A#{super}]";end
vm_insnhelper.c
goto no_refinement_dispatch;
}
}
cc->me = ref_me;
if (cc->me->def->type != VM_METHOD_TYPE_REFINED ||
cc->me->def != ref_me->def) {
cc->me = ref_me;
}
if (ref_me->def->type != VM_METHOD_TYPE_REFINED) {
return vm_call_method(ec, cfp, calling, ci, cc);
}
(2-2/2)