diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-04 10:08:17 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-04 10:08:17 +0900 |
commit | a3188f43a812a8c3954391af66ed54352423ef60 (patch) | |
tree | 59c44dbae944ed9ecf8bba783abcc9ba1576e2d0 /vm_eval.c | |
parent | 2d189a6721c5e88973a53e385c0fb9eeb55fece9 (diff) |
Revert "Revert "Fix dangling path name from fstring""
This reverts commit 326c00b6f89e1c86e6fe29ab60da593eb6883a88.
We also confirmed that test_gced_eval_location fails without the changes:
https://travis-ci.org/ruby/ruby/builds/567417818
https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-master/log/20190804T000003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-master/log/20190804T003005Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20190804T000007Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-master/log/20190804T001806Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian9/ruby-master/log/20190804T003005Z.fail.html.gz
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1284,6 +1284,7 @@ eval_make_iseq(VALUE src, VALUE fname, int line, const rb_binding_t *bind, } if (fname != Qundef) { + if (!NIL_P(fname)) fname = rb_fstring(fname); realpath = fname; } else if (bind) { @@ -1293,7 +1294,7 @@ eval_make_iseq(VALUE src, VALUE fname, int line, const rb_binding_t *bind, rb_parser_warn_location(parser, TRUE); } else { - fname = rb_usascii_str_new_cstr("(eval)"); + fname = rb_fstring_lit("(eval)"); } rb_parser_set_context(parser, base_block, FALSE); |