[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:81940] [Ruby trunk Bug#13723] Change to use RubyVM for syntax check in test suite breaks suite for non-MRI
From:
headius@...
Date:
2017-07-06 19:10:48 UTC
List:
ruby-core #81940
Issue #13723 has been updated by headius (Charles Nutter).
I have the following patch that uses eval when RubyVM::InstructionSequence is not available.
```diff
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index a01871f05c..b110855f45 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -471,11 +471,19 @@ def prepare_syntax_check(code, fname = caller_locations(2, 1)[0], mesg = fname.t
$VERBOSE = verbose
end
+ def check_syntax(src, filename, line)
+ if defined? RubyVM::InstructionSequence
+ RubyVM::InstructionSequence.compile(src, filename, filename, line)
+ else
+ eval src, binding, filename, line
+ end
+ end
+
def assert_valid_syntax(code, *args)
prepare_syntax_check(code, *args) do |src, fname, line, mesg|
yield if defined?(yield)
assert_nothing_raised(SyntaxError, mesg) do
- RubyVM::InstructionSequence.compile(src, fname, fname, line)
+ check_syntax(src, fname, line)
end
end
end
@@ -484,7 +492,7 @@ def assert_syntax_error(code, error, *args)
prepare_syntax_check(code, *args) do |src, fname, line, mesg|
yield if defined?(yield)
e = assert_raise(SyntaxError, mesg) do
- RubyVM::InstructionSequence.compile(src, fname, fname, line)
+ check_syntax(src, fname, line)
end
assert_match(error, e.message, mesg)
end
```
Ok?
----------------------------------------
Bug #13723: Change to use RubyVM for syntax check in test suite breaks suite for non-MRI
https://bugs.ruby-lang.org/issues/13723#change-65663
* Author: headius (Charles Nutter)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
In revision 57158 (6b5f9277 on github) nobu modified the syntax checks in test/lib/test/unit/assertions.rb to use MRI-specific features.
https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/57158
Specifically, instead of using eval to check syntax, it now uses RubyVM::InstructionSequence, which only exists on MRI.
Because of the way the MRI tests are structured, we need to use test/lib contents on JRuby to run the tests. This change means a number of tests that passed before now fail, because we don't support RubyVM::InstructionSequence.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>