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 | a35efc05adf6aaf98c99a12411ff7c518c879754 (patch) | |
tree | 9d73280d2f01bf42a43b57e08b7fd37b1b468103 | |
parent | b8e1343f5e4ff3f72c6e7e1616d0577ab4904730 (diff) |
* numeric.c (num_step): also return an enumerator object if no block
is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/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); |