summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 13:31:28 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 13:31:28 +0000
commit1e726cc87f051b40c779ab90df30fdc09aa2675b (patch)
tree3ee47591c30d905c0bd480935e726272ce626882
parent840a5b482aa275f1664e637ffcd4768fe20af7b8 (diff)
merge revision(s) 16239:
* re.c (rb_reg_search): use local variable. a patch from wanabe <s.wanabe AT gmail.com> in [ruby-dev:34537]. [ruby-dev:34492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--re.c5
-rw-r--r--version.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c1b2e96f37..344f52bde4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 15 22:30:30 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * re.c (rb_reg_search): use local variable. a patch from wanabe
+ <s.wanabe AT gmail.com> in [ruby-dev:34537]. [ruby-dev:34492]
+
Sun Jun 15 22:21:07 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dln.c (dln_find_1): prior files with extensions to files sans
diff --git a/re.c b/re.c
index e2d5e9dc14..0540f767f2 100644
--- a/re.c
+++ b/re.c
@@ -78,7 +78,7 @@ rb_memcicmp(x, y, len)
int tmp;
while (len--) {
- if (tmp = casetable[(unsigned)*p1++] - casetable[(unsigned)*p2++])
+ if ((tmp = casetable[(unsigned)*p1++] - casetable[(unsigned)*p2++]) != 0)
return tmp;
}
return 0;
@@ -892,7 +892,7 @@ rb_reg_search(re, str, pos, reverse)
{
long result;
VALUE match;
- static struct re_registers regs;
+ struct re_registers regs;
long range;
if (pos > RSTRING(str)->len || pos < 0) {
@@ -914,6 +914,7 @@ rb_reg_search(re, str, pos, reverse)
else {
range = RSTRING(str)->len - pos;
}
+ MEMZERO(&regs, struct re_registers, 1);
result = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len,
pos, range, &regs);
diff --git a/version.h b/version.h
index 4b37c7a3fd..1517187365 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 199
+#define RUBY_PATCHLEVEL 200
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8