summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-14 05:58:51 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-14 05:58:51 +0000
commit86d4408ce9c0463b9c77623cba5d58d9e9e9d289 (patch)
tree5f276c672aa8b49559aeee572a8743fdd1cdbd04 /eval.c
parent90d94de3b00f506dfb769501a5f11dbf2186d434 (diff)
merge revision(s) 44628: [Backport #9413]
* eval.c (rb_mod_s_constants): return its own constants for other than Module itself. [ruby-core:59763] [Bug #9413] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 9ceb833d37..92b02f73fa 100644
--- a/eval.c
+++ b/eval.c
@@ -313,8 +313,8 @@ rb_mod_s_constants(int argc, VALUE *argv, VALUE mod)
VALUE cbase = 0;
void *data = 0;
- if (argc > 0) {
- return rb_mod_constants(argc, argv, rb_cModule);
+ if (argc > 0 || mod != rb_cModule) {
+ return rb_mod_constants(argc, argv, mod);
}
while (cref) {