summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-28 13:32:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-28 13:32:32 +0000
commit7fa16fd9624ca38f2d82c121a9af5f22c87e2697 (patch)
tree74882cbdbbeabf1a9e76c8a34e0a626fd5078d4a /object.c
parentdd4fdb32bdbb68810fa77468157945a481bd85cc (diff)
Fix `Module#const_defined?` on inherited constants
[Fix GH-2061] From: manga_osyo <manga.osyo@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/object.c b/object.c
index 9029dad99c..d37c923fa6 100644
--- a/object.c
+++ b/object.c
@@ -2688,7 +2688,6 @@ rb_mod_const_defined(int argc, VALUE *argv, VALUE mod)
return Qfalse;
mod = rb_const_get_at(mod, id);
}
- recur = Qfalse;
if (p < pend && !RB_TYPE_P(mod, T_MODULE) && !RB_TYPE_P(mod, T_CLASS)) {
rb_raise(rb_eTypeError, "%"PRIsVALUE" does not refer to class/module",