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 | 5e4169c288db67f9611a59826b56264e6f6f272b (patch) | |
| tree | 9f8c227de74fef044b6127d0c4ba7b7a0877d659 | |
| parent | 022f66736428e1ca86294da4c6bec9de2e4ed151 (diff) | |
| download | ruby-5e4169c288db67f9611a59826b56264e6f6f272b.tar.gz ruby-5e4169c288db67f9611a59826b56264e6f6f272b.tar.xz ruby-5e4169c288db67f9611a59826b56264e6f6f272b.zip | |
* string.c (rb_str_upto): String#upto from empty string makes
inifinite loop. [ruby-core:09864]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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; } |
