1- fails:String#index raises a TypeError if passed nil
2- fails:String#index raises a TypeError if passed a boolean
3- fails:String#index raises a TypeError if passed a Symbol
41fails:String#index calls #to_str to convert the first argument
52fails:String#index calls #to_int to convert the second argument
6- fails:String#index raises a TypeError if passed a Fixnum
73fails:String#index with String behaves the same as String#index(char) for one-character strings
84fails:String#index with String returns the index of the first occurrence of the given substring
95fails:String#index with String doesn't set $~
@@ -14,17 +10,9 @@ fails:String#index with String returns nil if the substring isn't found
1410fails:String#index with String returns the character index of a multibyte character
1511fails:String#index with String returns the character index after offset
1612fails:String#index with String returns the character index after a partial first match
17- fails:String#index with String raises an Encoding::CompatibilityError if the encodings are incompatible
1813fails:String#index with Regexp behaves the same as String#index(string) for escaped string regexps
19- fails:String#index with Regexp returns the index of the first match of regexp
20- fails:String#index with Regexp sets $~ to MatchData of match and nil when there's none
21- fails:String#index with Regexp starts the search at the given offset
2214fails:String#index with Regexp starts the search at offset + self.length if offset is negative
23- fails:String#index with Regexp returns nil if the substring isn't found
24- fails:String#index with Regexp returns nil if the Regexp matches the empty string and the offset is out of range
2515fails:String#index with Regexp supports \G which matches at the given start offset
26- fails:String#index with Regexp converts start_offset to an integer via to_int
2716fails:String#index with Regexp returns the character index of a multibyte character
2817fails:String#index with Regexp returns the character index after offset
2918fails:String#index with Regexp treats the offset as a character index
30- fails:String#index with Regexp raises an Encoding::CompatibilityError if the encodings are incompatible
0 commit comments