diff options
author | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-26 23:30:25 +0000 |
---|---|---|
committer | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-26 23:30:25 +0000 |
commit | cbb56e30a4bc3d0f1446bdd3fb41f14a362e94fb (patch) | |
tree | 9fd90cc05e34b44c654ff7590854ca0f8f7be414 /vm_eval.c | |
parent | 599c3a92452995f897b03f68f3f7e86d62dc9cf9 (diff) | |
download | ruby-cbb56e30a4bc3d0f1446bdd3fb41f14a362e94fb.tar.gz |
* compile.c: Use rb_fstring() to de-duplicate string literals in code. [ruby-core:58599] [Bug #9159] [ruby-core:54405]
* iseq.c (prepare_iseq_build): De-duplicate iseq labels and source locations.
* re.c (rb_reg_initialize): Use rb_fstring() for regex string.
* string.c (rb_fstring): Handle non-string and already-fstr arguments.
* vm_eval.c (eval_string_with_cref): De-duplicate eval source filename.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1239,6 +1239,11 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *const cref_arg, fname = rb_usascii_str_new_cstr("(eval)"); } + if (RTEST(fname)) + fname = rb_fstring(fname); + if (RTEST(absolute_path)) + absolute_path = rb_fstring(absolute_path); + /* make eval iseq */ th->parse_in_eval++; th->mild_compile_error++; |