merge revision(s) r44628: [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_2_0_0@45010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2014-02-16 16:32:08 +00:00
parent bdcadb8c44
commit 37e3fd8802
4 changed files with 21 additions and 3 deletions

4
eval.c
View file

@ -377,8 +377,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) {