summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-08 05:20:34 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-08 05:20:34 +0000
commitd4110a1e7150384ace36a42a9483d1772f12b8c8 (patch)
tree24f82ed966318b3bf512feec2aa15b164cc8fba1 /variable.c
parentebd6cbda2fb3727a54735071ed9845765ffe5a06 (diff)
* parse.y (yycompile): should inherit "in_single" if eval happened
in a singleton method. * eval.c (rb_eval): class variables from singleton methods defined within singleton class statement should work like ones defined by sington def statements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/variable.c b/variable.c
index 878d858849..76bc8311a8 100644
--- a/variable.c
+++ b/variable.c
@@ -145,6 +145,9 @@ classname(klass)
VALUE path = Qnil;
ID classpath = rb_intern("__classpath__");
+ if (TYPE(klass) == T_ICLASS) {
+ klass = RBASIC(klass)->klass;
+ }
klass = rb_class_real(klass);
if (!klass) klass = rb_cObject;
if (ROBJECT(klass)->iv_tbl &&