$SAFE became a global variable in Ruby 2.6
Created by: sorah
Hi there, I'm @sorah from Ruby core team.
Recently we've changed $SAFE
into a global variable (which was previously local to a thread) at our head (trunk, 2.6.0dev).
- r61510, ruby/ruby@e7c1cbe0d3cdfafddead824c30e5fa0ba72999c1
- https://bugs.ruby-lang.org/issues/14250
Looks like rspec-core test suite expecting $SAFE
to be a thread local variable in MRI. This patch expects a global variable on Ruby 2.6 or higher.
P.S. Some tests still may fail. Looks like the current trunk is unintentionally broken, so I'm investigating why, and hit this error to run this test suite on the trunk.