diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-18 03:53:50 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-18 03:53:50 +0000 |
| commit | c772db7f01b64b5659832ba9bb7d344e90403b22 (patch) | |
| tree | 4ce3654143207bbd4e6b5899b40a8d9107dfe168 | |
| parent | 68c253043a6245dd9607eeb8a03b3cf07fa56c2a (diff) | |
| download | ruby-c772db7f01b64b5659832ba9bb7d344e90403b22.tar.gz ruby-c772db7f01b64b5659832ba9bb7d344e90403b22.tar.xz ruby-c772db7f01b64b5659832ba9bb7d344e90403b22.zip | |
* eval.c (rb_obj_instance_eval): evaluates under special singleton
classes as for special constants.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | eval.c | 9 |
2 files changed, 6 insertions, 8 deletions
@@ -1,3 +1,8 @@ +Wed Aug 18 12:52:55 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * eval.c (rb_obj_instance_eval): evaluates under special singleton + classes as for special constants. + Tue Aug 17 17:20:59 2004 Yukihiro Matsumoto <matz@ruby-lang.org> * io.c (rb_io_reopen): should clear allocated OpenFile. pointed @@ -6386,14 +6386,7 @@ rb_obj_instance_eval(argc, argv, self) VALUE *argv; VALUE self; { - VALUE klass; - - if (rb_special_const_p(self)) { - klass = Qnil; - } - else { - klass = rb_singleton_class(self); - } + VALUE klass = rb_singleton_class(self); return specific_eval(argc, argv, klass, self); } |
