Bug #10707 » 0001-vm_method.c-no-klass-no-method-entry.patch
test/ruby/test_refinement.rb | ||
---|---|---|
assert_raise(NoMethodError, bug10106) {Object.new.foo}
|
||
end;
|
||
assert_separately([], <<-"end;")
|
||
bug10707 = '[ruby-core:67389] [Bug #10707]'
|
||
module RefinementBug
|
||
refine BasicObject do
|
||
def foo
|
||
end
|
||
end
|
||
end
|
||
assert(methods, bug10707)
|
||
assert_raise(NameError, bug10707) {method(:foo)}
|
||
end;
|
||
end
|
||
private
|
vm_method.c | ||
---|---|---|
rb_method_entry_t *
|
||
rb_method_entry(VALUE klass, ID id, VALUE *defined_class_ptr)
|
||
{
|
||
if (!klass) return 0;
|
||
#if OPT_GLOBAL_METHOD_CACHE
|
||
struct cache_entry *ent;
|
||
ent = GLOBAL_METHOD_CACHE(klass, id);
|
- « Previous
- 1
- 2
- 3
- Next »