diff options
Diffstat (limited to 'spec/ruby/library/stringio/shared/read.rb')
-rw-r--r-- | spec/ruby/library/stringio/shared/read.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/library/stringio/shared/read.rb b/spec/ruby/library/stringio/shared/read.rb index c60677bba7..252a85d89d 100644 --- a/spec/ruby/library/stringio/shared/read.rb +++ b/spec/ruby/library/stringio/shared/read.rb @@ -89,6 +89,12 @@ describe :stringio_read_no_arguments, shared: true do @io.send(@method) @io.pos.should eql(7) end + + it "correctly update the current position in bytes when multi-byte characters are used" do + @io.print("example\u03A3") # Overwrite the original string with 8 characters containing 9 bytes. + @io.send(@method) + @io.pos.should eql(9) + end end describe :stringio_read_nil, shared: true do |