diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-22 02:12:37 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-22 02:12:37 +0000 |
commit | f77f9da445cf033a165878366e767b49458bd3c2 (patch) | |
tree | 68737eb6f04895068250714c355c4b8298c6595b | |
parent | 1d4c16458199f799af1335b50fcca82a678052d1 (diff) | |
download | ruby-f77f9da445cf033a165878366e767b49458bd3c2.tar.gz |
* string.c (rb_str_upto): should return enumerator if called
without block. [ruby-dev:37526]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | string.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Mon Dec 22 10:59:31 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * string.c (rb_str_upto): should return enumerator if called + without block. [ruby-dev:37526] + Mon Dec 22 09:54:43 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (gettable_gen): the encoding of __FILE__ should be @@ -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); |