Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CROSS_COMPILING guard and RUBYOPT=-v spec
The spec about `RUBYOPT=-v` fails since the point in time when the parser was switched to PRISM. But this wasn't noticed since the guard around it switched the two specs off, when executed from the ruby/ruby repository by `make test-spec`. This is because the constant `CROSS_COMPILING` is set by the `$(arch)-fake.rb` to `RUBY_PLATFORM` and mspec is executed with `-r $(arch)-fake.rb` on the command line of `make test-spec`. It is defined here: https://github.com/ruby/ruby/blob/98fce00cab460be81cb1f5e4cf8c0d66e006a35b/template/fake.rb.in#L40 This patch changes the guard to use `RbConfig` variable `CROSS_COMPILING` which is either "no" for a native build or "yes" when the ruby has been built per cross compiler. When the guard is fixed or when mspec is executed out of tree, the specs fail like so: https://github.com/oneclick/rubyinstaller2/actions/runs/11308579444/job/31451561785#step:32:78 To fix the failing specs the `PRISM` flag is removed from both sides before equality check. This is a leftover from the incomplete commit 76c1fef
- Loading branch information