StringIO doesn't work with frozen strings in #1008

bensummers opened this Issue Sep 12, 2013 · 3 comments


None yet

3 participants


Regression from 1.7.4. Here's a short script:

require 'stringio'
str = "Hello".freeze

Running with 1.7.4 and 1.7.5:

$ jruby -v test/stringio_test_case.rb 
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Server VM 1.7.0_25-b15 [SunOS-x86]

$ jruby -v test/stringio_test_case.rb 
jruby (1.9.3p392) 2013-09-12 77a0453 on Java HotSpot(TM) Server VM 1.7.0_25-b15 [SunOS-x86]
IOError: not modifiable string
    read at org/jruby/ext/stringio/
  (root) at test/stringio_test_case.rb:3

I found this by trying to parse frozen strings with REXML.


Our check now includes one for frozenness, which didn't exist before… e14ea63 but I don't think the logic is quite right.


Is this one worth fixing in 1.7.5?

headius commented Sep 13, 2013

Will fix.

@headius headius closed this in 6e4c3d3 Sep 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment