From fb0fe24512d1796f794306768ddac37566e9a209 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Thu, 4 Dec 1997 14:29:59 +0900 Subject: version 1.0-971204 https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-971204.tar.gz Thu Dec 4 14:29:59 1997 Yukihiro Matsumoto * version 1.0-971204 Mon Dec 1 15:24:41 1997 Yukihiro Matsumoto * compar.c (cmp_between): wrong comparison made. Wed Nov 26 18:18:05 1997 Yukihiro Matsumoto * numeric.c (fix2str): enlarge buffer to prevent overflow on some machines. --- string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index a9f3fc5ab0..7f1fae775e 100644 --- a/string.c +++ b/string.c @@ -682,12 +682,12 @@ str_aref(str, indx) return (VALUE)INT2FIX(str->ptr[idx] & 0xff); case T_REGEXP: - if (str_index(str, indx)) + if (str_match(str, indx)) return reg_last_match(0); return Qnil; case T_STRING: - if (str_index(str, indx, 0)) return indx; + if (str_index(str, indx, 0) != -1) return indx; return Qnil; default: -- cgit v1.2.3