summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-13 15:03:59 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-13 15:03:59 +0000
commita707f6249f82cdd5183b18d115c25a765e6a82a8 (patch)
tree1407388ce8795413046b74e48a2abf89ec0e3340 /eval.c
parent70f25096c0c389888c06e0fea358c92153633b8e (diff)
* eval.c (eval): allow to eval in a binding that has a singleton method.
[ruby-dev:33763] * test/ruby/test_proc.rb: add tests to achieve over 70% test coverage of time.c. * test/ruby/test_method.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 060de462f2..b738ec431e 100644
--- a/eval.c
+++ b/eval.c
@@ -1700,7 +1700,7 @@ eval(VALUE self, VALUE src, VALUE scope, const char *file, int line)
volatile VALUE iseqval;
if (scope != Qnil) {
- if (CLASS_OF(scope) == rb_cBinding) {
+ if (rb_obj_is_kind_of(scope, rb_cBinding)) {
GetBindingPtr(scope, bind);
envval = bind->env;
stored_cref_stack = bind->cref_stack;