summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-18 23:47:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-18 23:47:06 +0000
commit65bc8c10e8f25ac591399d30ed1dbc6d02d39ea5 (patch)
tree6e84eea97806f68842cb97cfeda3eb2861277f58 /string.c
parent65d7e55d11da368ec8c7ab600dcd6df53b1b5e3b (diff)
downloadruby-65bc8c10e8f25ac591399d30ed1dbc6d02d39ea5.tar.gz
ruby-65bc8c10e8f25ac591399d30ed1dbc6d02d39ea5.tar.xz
ruby-65bc8c10e8f25ac591399d30ed1dbc6d02d39ea5.zip
* string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index d70ea2186..75e828e7d 100644
--- a/string.c
+++ b/string.c
@@ -1408,6 +1408,7 @@ rb_str_upto(beg, end, excl)
rb_yield(current);
if (!excl && rb_str_equal(current, end)) break;
current = rb_funcall(current, succ, 0, 0);
+ StringValue(current);
if (excl && rb_str_equal(current, end)) break;
if (RSTRING(current)->len > RSTRING(end)->len)
break;