mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
* eval.c (rb_obj_instance_eval): evaluates under special singleton
classes as for special constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ecf157699d
commit
36cf9e9dbd
2 changed files with 6 additions and 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>
|
Tue Aug 17 17:20:59 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (rb_io_reopen): should clear allocated OpenFile. pointed
|
* io.c (rb_io_reopen): should clear allocated OpenFile. pointed
|
||||||
|
|
9
eval.c
9
eval.c
|
@ -6386,14 +6386,7 @@ rb_obj_instance_eval(argc, argv, self)
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
VALUE self;
|
VALUE self;
|
||||||
{
|
{
|
||||||
VALUE klass;
|
VALUE klass = rb_singleton_class(self);
|
||||||
|
|
||||||
if (rb_special_const_p(self)) {
|
|
||||||
klass = Qnil;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
klass = rb_singleton_class(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
return specific_eval(argc, argv, klass, self);
|
return specific_eval(argc, argv, klass, self);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue