From 89177a70aa4187d30ab441538ce59df19ffa9de6 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 6 Aug 2002 06:20:43 +0000 Subject: * string.c (rb_str_rindex): must return -1 if unmatched. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 1 + 1 file changed, 1 insertion(+) (limited to 'string.c') diff --git a/string.c b/string.c index e687fcc53..119852044 100644 --- a/string.c +++ b/string.c @@ -912,6 +912,7 @@ rb_str_rindex(str, sub, pos) } s--; } + return -1; } else { return pos; -- cgit