diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-09-16 09:40:33 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-09-16 09:40:33 +0000 |
commit | 9e3d9a2a009d2a0281802a84e1c5cc1c887edc71 (patch) | |
tree | ea994af7deeef43977f60a9ab26131e8cd90a9a0 /string.c | |
parent | 69a3aaf154948d653fa3653cd2b3c3b3af979769 (diff) | |
download | ruby-9e3d9a2a009d2a0281802a84e1c5cc1c887edc71.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |