summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-11 07:24:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-11 07:24:11 +0000
commitc5fb7cf4fb7759ae020032f344460c2accef2bc7 (patch)
tree37621427e11c9e2bf672c05c25b24bf0d365a639 /regex.c
parentb0faee9b9cd5a747e226a2c64f33588b2b8f4e6c (diff)
1.3.8 to be, final beta (hopefully)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/regex.c b/regex.c
index d4eea4cb74..aa0b61300f 100644
--- a/regex.c
+++ b/regex.c
@@ -2941,7 +2941,9 @@ re_search(bufp, string, size, startpos, range, regs)
if (range > 0) {
if (startpos > 0)
return -1;
- return re_match(bufp, string, size, 0, regs);
+ else if (re_match(bufp, string, size, 0, regs) >= 0)
+ return 0;
+ return -1;
}
break;
@@ -4066,12 +4068,6 @@ re_match(bufp, string_arg, size, pos, regs)
loop, need to pop this failure point and use the next one. */
pop_loop:
switch ((enum regexpcode)*p1) {
- case stop_paren:
-#if 0
- failed_paren = 1;
- p1++;
- goto pop_loop;
-#endif
case jump_n:
case finalize_push_n:
is_a_jump_n = 1;