From: Dave Thomas Date: 2000-02-09T09:48:54-06:00 Subject: [ruby-talk:01277] Buggette in String ruby -e 'p "hello".index(/l/, -3)' # -> nil ruby -e 'p "hello".index("l", -3)' # -> 2 I suspect string.c:568 should change from pos = rb_reg_adjust_startpos(sub, str, pos, 0); to if (pos < 0) pos = rb_reg_adjust_startpos(sub, str, -pos, 1); else pos = rb_reg_adjust_startpos(sub, str, pos, 0); but knowing for sure would mean understanding the regexp setup code, and I only have one life ;-) Regards Dave