diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-15 12:35:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-15 12:35:00 +0000 |
commit | 0fce0b7ba1337b25d717fc39481eef556d247005 (patch) | |
tree | 6727d5c8dd30f8fced14eccdf53d0aa722de4262 /proc.c | |
parent | 218029f06d0a43befac4a899dbeb302f901142ed (diff) | |
download | ruby-0fce0b7ba1337b25d717fc39481eef556d247005.tar.gz |
proc.c: singleton_method should not use refinements
* proc.c (rb_obj_singleton_method): Kernel#singleton_method should
not use refinements, as well as Kernel#method.
[ruby-core:67603] [Bug #10744]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1528,7 +1528,8 @@ rb_obj_singleton_method(VALUE obj, VALUE vid) QUOTE(vid), obj); } if (NIL_P(klass = rb_singleton_class_get(obj)) || - !(me = rb_method_entry_at(klass, id))) { + UNDEFINED_METHOD_ENTRY_P(me = rb_method_entry_at(klass, id)) || + UNDEFINED_REFINED_METHOD_P(me->def)) { rb_name_error(id, "undefined singleton method `%"PRIsVALUE"' for `%"PRIsVALUE"'", QUOTE_ID(id), obj); } @@ -2831,4 +2832,3 @@ Init_Binding(void) rb_define_method(rb_cBinding, "receiver", bind_receiver, 0); rb_define_global_function("binding", rb_f_binding, 0); } - |