diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-20 02:47:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-20 02:47:13 +0000 |
commit | 7f4a9ffe12e77d1e334b0d23a4ff479224f89b9e (patch) | |
tree | 9d73280d2f01bf42a43b57e08b7fd37b1b468103 | |
parent | 9528953c8dfbf61b03a813fa9c2d2f6b48d159bf (diff) | |
download | ruby-7f4a9ffe12e77d1e334b0d23a4ff479224f89b9e.tar.gz ruby-7f4a9ffe12e77d1e334b0d23a4ff479224f89b9e.tar.xz ruby-7f4a9ffe12e77d1e334b0d23a4ff479224f89b9e.zip |
* numeric.c (num_step): also return an enumerator object if no block
is given.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | numeric.c | 1 |
2 files changed, 7 insertions, 1 deletions
@@ -1,6 +1,11 @@ +Sun Aug 20 11:46:52 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * numeric.c (num_step): also return an enumerator object if no block + is given. + Sat Aug 19 16:47:51 2006 Masaki Suketa <masaki.suketa@nifty.ne.jp> - * ext/win32ole/win32ole.c (hash2named_arg): accept hash argument + * ext/win32ole/win32ole.c (hash2named_arg): accept hash argument of symbol key. * test/win32ole/test_win32ole.rb @@ -1387,6 +1387,7 @@ num_step(int argc, VALUE *argv, VALUE from) { VALUE to, step; + RETURN_ENUMERATOR(from, argc, argv); if (argc == 1) { to = argv[0]; step = INT2FIX(1); |