summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-04-28 23:20:11 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-04-28 23:20:11 +0200
commit79671ec57e59091260a0bc3d40a31d31d9c72a94 (patch)
tree2f59a8727b8f63f9e79d50352fa4f78a7cc00234 /spec/ruby/library/stringio
parent994833085ae06afbe94d30ab183d80e0234fbe14 (diff)
Update to ruby/spec@7de852d
Diffstat (limited to 'spec/ruby/library/stringio')
-rw-r--r--spec/ruby/library/stringio/getch_spec.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/library/stringio/getch_spec.rb b/spec/ruby/library/stringio/getch_spec.rb
index 06670a178c..113b4971bf 100644
--- a/spec/ruby/library/stringio/getch_spec.rb
+++ b/spec/ruby/library/stringio/getch_spec.rb
@@ -17,15 +17,13 @@ describe "StringIO#getch" do
io.getch.should == ?a
end
- with_feature :encoding do
- it "increments #pos by the byte size of the character in multibyte strings" do
- io = StringIO.new("föóbar")
-
- io.getch; io.pos.should == 1 # "f" has byte size 1
- io.getch; io.pos.should == 3 # "ö" has byte size 2
- io.getch; io.pos.should == 5 # "ó" has byte size 2
- io.getch; io.pos.should == 6 # "b" has byte size 1
- end
+ it "increments #pos by the byte size of the character in multibyte strings" do
+ io = StringIO.new("föóbar")
+
+ io.getch; io.pos.should == 1 # "f" has byte size 1
+ io.getch; io.pos.should == 3 # "ö" has byte size 2
+ io.getch; io.pos.should == 5 # "ó" has byte size 2
+ io.getch; io.pos.should == 6 # "b" has byte size 1
end
it "returns nil at the end of the string" do