From 05399745bf5ce56c12741ef076f267de39de8a4d 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: http://svn.ruby-lang.org/repos/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 060de462f..b738ec431 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