You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bin/jruby -v
jruby 9.4.4.0-SNAPSHOT (3.1.4) 2023-06-18 656f9d6570 OpenJDK 64-Bit Server VM 11.0.20.1+1-post-Ubuntu-0ubuntu122.04 on 11.0.20.1+1-post-Ubuntu-0ubuntu122.04 [x86_64-linux]
$ uname -a
Linux juno 6.2.0-1011-lowlatency #11~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Aug 16 16:22:57 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
jruby 9.4.4.0-SNAPSHOT (3.1.4) 2023-06-18 656f9d6570 OpenJDK 64-Bit Server VM 11.0.20.1+1-post-Ubuntu-0ubuntu122.04 on 11.0.20.1+1-post-Ubuntu-0ubuntu122.04 [x86_64-linux]
false
When run with bin/jruby --debug foo.rb
jruby 9.4.4.0-SNAPSHOT (3.1.4) 2023-06-18 656f9d6570 OpenJDK 64-Bit Server VM 11.0.20.1+1-post-Ubuntu-0ubuntu122.04 on 11.0.20.1+1-post-Ubuntu-0ubuntu122.04 [x86_64-linux]
false
FrozenError: can't modify frozen String, created at foo.rb:5
force_encoding at org/jruby/RubyString.java:6663
force_encoding at org/jruby/RubyString.java:6659
<main> at foo.rb:7
Ahh good catch. The logic for +@ likely needs to be updated to check frozenness correctly. Interesting that this was not caught by any tests or specs but perhaps we exclude one that does.
headius
added a commit
to headius/jruby
that referenced
this issue
Sep 8, 2023
No flag was set and nothing was overridden, so it did not appear
frozen via isFrozen checks. This caused jruby#7924.
The fix here both sets that flag and also overrides isFrozen to
always be true.
Fixesjruby#7924
Environment Information
Using jruby HEAD:
Reproduction
File
foo.rb
:When run with
bin/jruby foo.rb
:When run with
bin/jruby --debug foo.rb
This error does not occur with jruby-9.4.2.0.
This was discovered by upstream nokogiri integration testing: https://github.com/sparklemotion/nokogiri/actions/runs/6076083505/job/16483500598
The text was updated successfully, but these errors were encountered: