I tried the following
this is logical
assert_equal 4, str.index(“a”, 4)
this is not logical. shouldn’t this be nil !?
assert_equal 2, str.mb_chars.index(“a”, 4)
Why is the last line failing? And how could I fix this?
PS: I am using ruby 1.8.6 on linux with rails 2.2.2