summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-09-16 09:40:33 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-09-16 09:40:33 +0000
commit9e3d9a2a009d2a0281802a84e1c5cc1c887edc71 (patch)
treeea994af7deeef43977f60a9ab26131e8cd90a9a0 /string.c
parent69a3aaf154948d653fa3653cd2b3c3b3af979769 (diff)
1.4.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 94acc767fb..7bb9d09966 100644
--- a/string.c
+++ b/string.c
@@ -520,7 +520,7 @@ rb_str_match(x, y)
reg = rb_reg_regcomp(y);
start = rb_reg_search(reg, x, 0, 0);
if (start == -1) {
- return Qfalse;
+ return Qnil;
}
return INT2NUM(start);
@@ -760,7 +760,7 @@ rb_str_upto(beg, end, excl)
if (TYPE(end) != T_STRING) end = rb_str_to_str(end);
current = beg;
- for (;;) {
+ while (rb_str_cmp(current, end) <= 0) {
rb_yield(current);
if (!excl && rb_str_equal(current, end)) break;
current = rb_str_succ(current);