Now, I wonder what's causing this to interact badly with
test-unit...
Same test with minitest (5.10.1) + ruby 2.5.0dev r57744 works fine:
require 'minitest/autorun'
class TestString < Minitest::Test
def test_string_freeze
assert_equal "foo".freeze.object_id, "foo".freeze.object_id
end
end
Now, I wonder what's causing this to interact badly with
test-unit...
power_assert/enable_tracepoint_events - this disables all
sorts of MRI optimizations for testing.
For background, I was relying on opt_str_freeze to detect
the presence of the optimization so I could enable (or skip)
further tests for my own optimizations which were mainline
Ruby-specific.