* 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
This commit is contained in:
nobu 2006-08-20 02:47:13 +00:00
Родитель b8e1343f5e
Коммит a35efc05ad
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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> 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. of symbol key.
* test/win32ole/test_win32ole.rb * test/win32ole/test_win32ole.rb

Просмотреть файл

@ -1387,6 +1387,7 @@ num_step(int argc, VALUE *argv, VALUE from)
{ {
VALUE to, step; VALUE to, step;
RETURN_ENUMERATOR(from, argc, argv);
if (argc == 1) { if (argc == 1) {
to = argv[0]; to = argv[0];
step = INT2FIX(1); step = INT2FIX(1);