Skip to content

Commit c1d5541

Browse files
headiusmrzasa
authored andcommitted
[ruby/stringio] Allow seek when underlying string is frozen
(ruby/stringio#121) Fixes ruby/stringio#119. Adds a test for this expectation. ruby/stringio@3f90fe44c6
1 parent 02c9535 commit c1d5541

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/stringio/test_stringio.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,11 @@ def test_seek
483483
f.close unless f.closed?
484484
end
485485

486+
def test_seek_frozen_string
487+
f = StringIO.new(-"1234")
488+
assert_equal(0, f.seek(1))
489+
end
490+
486491
def test_each_byte
487492
f = StringIO.new("1234")
488493
a = []

0 commit comments

Comments
 (0)