Bug #13282
closedopt_str_freeze does not always dedupe
Description
Attached is the same test extracted from test/ruby/test_optimization.rb
but it fails in a standalone context. Not sure why...
It's not a new breakage in trunk, either.
Testing with some old installs I had around, 2.1.9p490 seems fine,
however even Ruby 2.2.1 seems broken
Files
Updated by normalperson (Eric Wong) about 7 years ago
normalperson@yhbt.net wrote:
Testing with some old installs I had around, 2.1.9p490 seems fine,
Too Bad I'm Wrong.
It's seems to be only tickled by the gemification of test-unit
in 2.2. Using the test-unit gem with 2.1 still fails...
Now, I wonder what's causing this to interact badly with
test-unit...
Updated by normalperson (Eric Wong) about 7 years ago
Eric Wong normalperson@yhbt.net wrote:
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
Strange...
Updated by normalperson (Eric Wong) about 7 years ago
Eric Wong normalperson@yhbt.net wrote:
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.
Updated by ko1 (Koichi Sasada) about 7 years ago
- Status changed from Open to Rejected
for this case, specialized_instruction
compilation option disable this feature.
Updated by naruse (Yui NARUSE) about 7 years ago
- Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: WONTFIX, 2.3: WONTFIX, 2.4: WONTFIX