Skip to content

Commit

Permalink
merge revision(s) 16239:
Browse files Browse the repository at this point in the history
	* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_6@17266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shyouhei committed Jun 15, 2008
1 parent 176d8e9 commit c1ce767
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Sun Jun 15 22:31:47 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:20:45 2008 Yukihiro Matsumoto <matz@ruby-lang.org>

* sprintf.c (rb_f_sprintf): should protect temporary string from
Expand Down
5 changes: 3 additions & 2 deletions re.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion version.h
Expand Up @@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080615
#define RUBY_PATCHLEVEL 200
#define RUBY_PATCHLEVEL 201

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
Expand Down

0 comments on commit c1ce767

Please sign in to comment.