summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/shared/read.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2022-07-27 17:18:25 +0200
committerBenoit Daloze <eregontp@gmail.com>2022-07-27 17:18:25 +0200
commit6582df26dcdef5dab01242b4d97d9b242e959860 (patch)
tree99824a5c370ef27acd12905b67304870f1af9561 /spec/ruby/library/stringio/shared/read.rb
parent44f42413e6c3c2b487a03b53bf6cacbb83ac285b (diff)
Update to ruby/spec@cbfaf51
Diffstat (limited to 'spec/ruby/library/stringio/shared/read.rb')
-rw-r--r--spec/ruby/library/stringio/shared/read.rb6
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