[ruby-core:81961] [Ruby trunk Bug#13723] Change to use RubyVM for syntax check in test suite breaks suite for non-MRI

From: headius@...
Date: 2017-07-07 19:19:01 UTC
List: ruby-core #81961
Issue #13723 has been updated by headius (Charles Nutter).


nobu (Nobuyoshi Nakada) wrote:
> In some cases, `RubyVM::InstructionSequence.compile` and `eval` fail in different manor.

Ok, but I still need a way to run the tests. The original code used `eval`...is there a reason it needed to change to `InstructionSequence.compile`?


----------------------------------------
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-65685

* 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>

In This Thread

Prev Next