Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add spec for debug chilled string mutation
See #8861
  • Loading branch information
headius committed Jul 1, 2025
commit 9ebc06d295e8968bcc4a20e5978fc979ad8df3da
11 changes: 11 additions & 0 deletions spec/compiler/general_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1566,5 +1566,16 @@ def z_super
BZSuper.new.z_super
SUPER
end

it "compiles debug chilled strings that can be modified without impacting other strings" do
JRuby.runtime.instance_config.debugging_frozen_string_literal = true
run(<<~CHILLED) {|val| expect(val).to eq("")}
str = ""
str << "hello"
""
CHILLED
ensure
JRuby.runtime.instance_config.debugging_frozen_string_literal = false
end
end
end