summaryrefslogtreecommitdiffstats
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
commit05399745bf5ce56c12741ef076f267de39de8a4d (patch)
tree1407388ce8795413046b74e48a2abf89ec0e3340 /eval.c
parente13d02d746bf17226c6cb6b1f68ab7fa27c31fbf (diff)
downloadruby-05399745bf5ce56c12741ef076f267de39de8a4d.tar.gz
ruby-05399745bf5ce56c12741ef076f267de39de8a4d.tar.xz
ruby-05399745bf5ce56c12741ef076f267de39de8a4d.zip
* 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
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 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;