summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-30 14:44:06 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-30 14:44:06 +0000
commitf6f453438242fe724dcf0d2d5c968a5861820848 (patch)
tree94f126d2bbcff152fb05711ba9a4a9ce1f4c07e0 /variable.c
parented73a902b80cec1bc42465fba4a07b8a6503e6ab (diff)
* variable.c (rb_path2class): don't raise NameError when the middle
constant of the path is not defined but defined on toplevel. [ruby-core:41410] [Bug #5691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index ae89e8eead..abdb39ad10 100644
--- a/variable.c
+++ b/variable.c
@@ -272,7 +272,7 @@ rb_path_to_class(VALUE pathname)
p += 2;
pbeg = p;
}
- if (!rb_const_defined(c, id)) {
+ if (!rb_const_defined_at(c, id)) {
undefined_class:
rb_raise(rb_eArgError, "undefined class/module %.*s", (int)(p-path), path);
}