diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-19 07:13:14 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-19 07:13:14 +0000 |
commit | eb97eb08ee4d9791c74c1bd0b62535d7e4169129 (patch) | |
tree | bca07e8c2a693be7d336684f5a49db811a90dc3a /proc.c | |
parent | ffbc5612926451c42a5904c6ab5449da87b33f32 (diff) |
merge revision(s) 49259: [Backport #10744]
* 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/branches/ruby_2_2@49646 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); } - |