diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-08 19:02:50 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-08 19:02:50 +0000 |
commit | 7ba0cd826e6fb6555bb5eb79bc84f8167294afe9 (patch) | |
tree | 9f8c227de74fef044b6127d0c4ba7b7a0877d659 /string.c | |
parent | ccb7ce612088ed56b28ec3f70eb14a39f38834ff (diff) |
* string.c (rb_str_upto): String#upto from empty string makes
inifinite loop. [ruby-core:09864]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1463,7 +1463,7 @@ rb_str_upto(beg, end, excl) StringValue(current); if (excl && rb_str_equal(current, end)) break; StringValue(current); - if (RSTRING(current)->len > RSTRING(end)->len) + if (RSTRING(current)->len > RSTRING(end)->len || RSTRING(current)->len == 0) break; } |