diff options
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |