[ruby/stringio] Allow seek when underlying string is frozen
(https://github.com/ruby/stringio/pull/121) Fixes https://github.com/ruby/stringio/pull/119. Adds a test for this expectation. https://github.com/ruby/stringio/commit/3f90fe44c6
This commit is contained in:
parent
0f1cb92345
commit
7d7984642c
@ -483,6 +483,11 @@ class TestStringIO < Test::Unit::TestCase
|
||||
f.close unless f.closed?
|
||||
end
|
||||
|
||||
def test_seek_frozen_string
|
||||
f = StringIO.new(-"1234")
|
||||
assert_equal(0, f.seek(1))
|
||||
end
|
||||
|
||||
def test_each_byte
|
||||
f = StringIO.new("1234")
|
||||
a = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user