ruby-changes:56798
From: Takashi <ko1@a...>
Date: Sun, 4 Aug 2019 08:57:06 +0900 (JST)
Subject: [ruby-changes:56798] Takashi Kokubun: 326c00b6f8 (master): Revert "Fix dangling path name from fstring"
https://git.ruby-lang.org/ruby.git/commit/?id=326c00b6f8 From 326c00b6f89e1c86e6fe29ab60da593eb6883a88 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Sun, 4 Aug 2019 08:38:37 +0900 Subject: Revert "Fix dangling path name from fstring" This reverts commit 5931857281ce45c1c277aa86d1588119ab00a955 temporarily, leaving `TestEval#test_gced_eval_location` to see the impact for missing the changes. That's because too many CIs are failing for `require` behaviors: http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-master/log/20190803T063004Z.fail.html.gz http://rubyci.s3.amazonaws.com/unstable10x/ruby-master/log/20190803T051806Z.fail.html.gz http://rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20190803T052406Z.fail.html.gz http://rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190803T111909Z.fail.html.gz http://rubyci.s3.amazonaws.com/unstable11s/ruby-master/log/20190803T062506Z.fail.html.gz http://rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190803T052505Z.fail.html.gz https://app.wercker.com/ruby/ruby/runs/mjit-test1/5d4512c921ca08000857936a?step=5d451305c2809c0008a3da76 https://app.wercker.com/ruby/ruby/runs/mjit-test2/5d4512c921ca080008579371?step=5d4513000421020007ca122d http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/2177591 http://ci.rvm.jp/results/trunk_gcc6@silicon-docker/2177596 http://ci.rvm.jp/results/trunk_clang_60@silicon-docker/2178802 http://ci.rvm.jp/results/trunk-theap-asserts@silicon-docker/2177555 http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2178747 Mostly `TestRequire#test_race_exception` failures, but in ci.rvm.jp `require` inside rubyspec hangs very often. diff --git a/parse.y b/parse.y index de2a922..3bff42a 100644 --- a/parse.y +++ b/parse.y @@ -5812,7 +5812,7 @@ yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line) https://github.com/ruby/ruby/blob/trunk/parse.y#L5812 p->ruby_sourcefile = "(none)"; } else { - p->ruby_sourcefile_string = rb_fstring(fname); + p->ruby_sourcefile_string = rb_str_new_frozen(fname); p->ruby_sourcefile = StringValueCStr(fname); } p->ruby_sourceline = line - 1; @@ -9773,7 +9773,7 @@ gettable(struct parser_params *p, ID id, const YYLTYPE *loc) https://github.com/ruby/ruby/blob/trunk/parse.y#L9773 if (NIL_P(file)) file = rb_str_new(0, 0); else - file = rb_str_dup(file); + file = rb_str_dup(rb_fstring(file)); node = NEW_STR(add_mark_object(p, file), loc); } return node; diff --git a/vm_eval.c b/vm_eval.c index 222389e..eb728c0 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -1284,7 +1284,6 @@ eval_make_iseq(VALUE src, VALUE fname, int line, const rb_binding_t *bind, https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1284 } if (fname != Qundef) { - if (!NIL_P(fname)) fname = rb_fstring(fname); realpath = fname; } else if (bind) { @@ -1294,7 +1293,7 @@ eval_make_iseq(VALUE src, VALUE fname, int line, const rb_binding_t *bind, https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1293 rb_parser_warn_location(parser, TRUE); } else { - fname = rb_fstring_lit("(eval)"); + fname = rb_usascii_str_new_cstr("(eval)"); } rb_parser_set_context(parser, base_block, FALSE); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/