diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-04-28 23:20:11 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-04-28 23:20:11 +0200 |
commit | 79671ec57e59091260a0bc3d40a31d31d9c72a94 (patch) | |
tree | 2f59a8727b8f63f9e79d50352fa4f78a7cc00234 /spec/ruby/core/string/rindex_spec.rb | |
parent | 994833085ae06afbe94d30ab183d80e0234fbe14 (diff) |
Update to ruby/spec@7de852d
Diffstat (limited to 'spec/ruby/core/string/rindex_spec.rb')
-rw-r--r-- | spec/ruby/core/string/rindex_spec.rb | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/spec/ruby/core/string/rindex_spec.rb b/spec/ruby/core/string/rindex_spec.rb index 98e36785e3..f74c0115cc 100644 --- a/spec/ruby/core/string/rindex_spec.rb +++ b/spec/ruby/core/string/rindex_spec.rb @@ -347,22 +347,20 @@ describe "String#rindex with Regexp" do lambda { "str".rindex(/../, nil) }.should raise_error(TypeError) end - with_feature :encoding do - it "returns the reverse character index of a multibyte character" do - "ありがりがとう".rindex("が").should == 4 - "ありがりがとう".rindex(/が/).should == 4 - end + it "returns the reverse character index of a multibyte character" do + "ありがりがとう".rindex("が").should == 4 + "ありがりがとう".rindex(/が/).should == 4 + end - it "returns the character index before the finish" do - "ありがりがとう".rindex("が", 3).should == 2 - "ありがりがとう".rindex(/が/, 3).should == 2 - end + it "returns the character index before the finish" do + "ありがりがとう".rindex("が", 3).should == 2 + "ありがりがとう".rindex(/が/, 3).should == 2 + end - it "raises an Encoding::CompatibilityError if the encodings are incompatible" do - re = Regexp.new "れ".encode(Encoding::EUC_JP) - lambda do - "あれ".rindex re - end.should raise_error(Encoding::CompatibilityError) - end + it "raises an Encoding::CompatibilityError if the encodings are incompatible" do + re = Regexp.new "れ".encode(Encoding::EUC_JP) + lambda do + "あれ".rindex re + end.should raise_error(Encoding::CompatibilityError) end end |