Allow read-only methods to work against a frozen StringIO#122
Allow read-only methods to work against a frozen StringIO#122headius wants to merge 4 commits intoruby:masterfrom
Conversation
seek only modifies the StringIO pos, and should work when the underlying String is frozen. Fixes ruby#119
This fixes the JRuby extension to allow read-only methods to work against a frozen StringIO, as described in ruby#119.
It would make sense to me that |
|
See also: https://bugs.ruby-lang.org/issues/21151 |
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.
|
@headius Can this be closed? |
|
@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.