From 0f3decb07100e63ccfa9f7a986c80f643a9bef1a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 21 Oct 2004 15:21:08 +0000 Subject: [PATCH] * string.c (rb_str_include): should not treat char as negative value. [ruby-dev:24558] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 11 ++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e9264944a..5cc31577ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 22 00:20:33 2004 Nobuyoshi Nakada + + * string.c (rb_str_include): should not treat char as negative value. + [ruby-dev:24558] + Thu Oct 21 19:06:15 2004 GOTOU Yuuzou * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io): diff --git a/string.c b/string.c index e2f7fab1e6..bcdd6c3c2c 100644 --- a/string.c +++ b/string.c @@ -2422,15 +2422,8 @@ rb_str_include(str, arg) long i; if (FIXNUM_P(arg)) { - int c = FIX2INT(arg); - long len = RSTRING(str)->len; - char *p = RSTRING(str)->ptr; - - for (i=0; iptr, FIX2INT(arg), RSTRING(str)->len)) + return Qtrue; return Qfalse; }