diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-17 08:58:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-17 08:58:05 +0000 |
commit | 5c92de87b439d5c5cbe96132b28007bd7326d728 (patch) | |
tree | e67e72d57c2605c109d5180d1dec6f0c6e7d62af /eval.c | |
parent | 2c3522c3e403dfdadaaf6095564bde364cc4bddf (diff) | |
download | ruby-5c92de87b439d5c5cbe96132b28007bd7326d728.tar.gz |
eval.c: singleton class constants
* 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/trunk@44628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -378,8 +378,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) { |