From 7e7420cc852698eeae6bf6dda96cfd95fa64905b Mon Sep 17 00:00:00 2001 From: mame Date: Sun, 16 May 2010 08:18:49 +0000 Subject: * proc.c (proc_binding): don't propagative filename and line_no of binding that is created from C level. [ruby-dev:41322] * vm_eval.c (eval_string_with_cref): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index 7a8fffedb9..22d60ee819 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -966,7 +966,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char if (rb_obj_is_kind_of(scope, rb_cBinding)) { GetBindingPtr(scope, bind); envval = bind->env; - if (strcmp(file, "(eval)") == 0) { + if (strcmp(file, "(eval)") == 0 && bind->filename != Qnil) { file = RSTRING_PTR(bind->filename); line = bind->line_no; } -- cgit v1.2.3