Uh oh!
There was an error while loading. Please reload this page.
Allow read-only methods to work against a frozen StringIO - #122
Conversation
seek only modifies the StringIO pos, and should work when the underlying String is frozen. Fixesruby#119
This fixes the JRuby extension to allow read-only methods to work against a frozen StringIO, as described in ruby#119.
headius
commented
Feb 20, 2025
byroot
commented
Feb 21, 2025
It would make sense to me that |
kou
commented
Aug 9, 2025
See also: https://bugs.ruby-lang.org/issues/21151 |
headius
commented
Aug 11, 2025
This isn't really the use case here. What I'm seeking is a way to freeze a There's no reason I can think of that accessing current |
| f.freeze | ||
| assert_nothing_raised do | ||
| f2 = f.dup | ||
| assert_true(f2.frozen?) |
There was a problem hiding this comment.
Usually dupped objects are not frozen.
nobu
commented
Mar 3, 2026
@headius Can this be closed? |
headius
commented
Mar 3, 2026
@nobu Yes I believe your PR covers my case. Thank you! |
Add tests and fix behavior to allow several read-only StringIO methods to function when the StringIO is frozen.
See #120 for details.