mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +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
9
eval.c
9
eval.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue