summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-22 02:12:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-22 02:12:37 +0000
commit5871cfa0566d14cc88f249d202d12096863bed3d (patch)
tree68737eb6f04895068250714c355c4b8298c6595b /string.c
parentef6481f88233b791ff12dff7cf33aa30d55b2d90 (diff)
downloadruby-5871cfa0566d14cc88f249d202d12096863bed3d.tar.gz
ruby-5871cfa0566d14cc88f249d202d12096863bed3d.tar.xz
ruby-5871cfa0566d14cc88f249d202d12096863bed3d.zip
* string.c (rb_str_upto): should return enumerator if called
without block. [ruby-dev:37526] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20906 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 d34a1e861..9db82d4a2 100644
--- a/string.c
+++ b/string.c
@@ -2861,6 +2861,7 @@ rb_str_upto(int argc, VALUE *argv, VALUE beg)
rb_encoding *enc;
rb_scan_args(argc, argv, "11", &end, &exclusive);
+ RETURN_ENUMERATOR(beg, argc, argv);
excl = RTEST(exclusive);
CONST_ID(succ, "succ");
StringValue(end);