summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 09:50:32 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-25 09:50:32 +0000
commit328281359dc5b55accece776a1988a1b5b45b3cf (patch)
tree01fdb058fb25fc582a70af9f1db0ed3bdb29da86 /string.c
parent857421fefe356eb7d32690ef40d5f7cc76b0e87c (diff)
merges r20906 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@20995 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 e0efa0477..c1f14a852 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);