From a707f6249f82cdd5183b18d115c25a765e6a82a8 Mon Sep 17 00:00:00 2001 From: mame Date: Wed, 13 Feb 2008 15:03:59 +0000 Subject: * 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 --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') 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; -- cgit v1.2.3