Skip to content

Commit 03a790f

Browse files
author
Lillian Zhang
committed
Add a spec to String#index
when it returns the character index of a more complex multibyte character string after offset (to add a spec that breaks on my silly bug).
1 parent b308cf9 commit 03a790f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spec/ruby/core/string/index_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146

147147
it "returns the character index after offset" do
148148
"われわれ".index("わ", 1).should == 2
149+
"ありがとうありがとう".index("が",3).should == 7
149150
end
150151

151152
it "returns the character index after a partial first match" do

0 commit comments

Comments
 (0)