summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-13 09:38:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-13 09:38:49 +0000
commit4b7514527870f3e7268846ee9fb275301f57b30a (patch)
tree652d86baec39246b717b690df4725b8f67ed42f3 /proc.c
parentaae1d28b6f33d1237e576317497d22158114f103 (diff)
proc.c: skip prepends
* proc.c (mnew): skip prepending modules and return the method bound on the given class. [ruby-core:52160] [Bug #7836] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index 6424eeb4ff..bc47359e8e 100644
--- a/proc.c
+++ b/proc.c
@@ -941,6 +941,7 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope)
rb_method_flag_t flag = NOEX_UNDEF;
again:
+ if (klass) klass = RCLASS_ORIGIN(klass);
me = rb_method_entry_without_refinements(klass, id, &defined_class);
if (UNDEFINED_METHOD_ENTRY_P(me)) {
ID rmiss = rb_intern("respond_to_missing?");