зеркало из https://github.com/github/ruby.git
* dir.c (dir_foreach): return Enumerator if no block given.
[ruby-dev:31525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b6449f6080
Коммит
5d51ae926b
|
@ -3,6 +3,9 @@ Mon Aug 20 23:28:39 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
* string.c (Init_String): remove Symbol.intern and Symbol#dump.
|
||||
[ruby-dev:31525]
|
||||
|
||||
* dir.c (dir_foreach): return Enumerator if no block given.
|
||||
[ruby-dev:31525]
|
||||
|
||||
Mon Aug 20 23:17:14 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_core.h (struct rb_thread_struct): removed first_func_arg and
|
||||
|
|
1
dir.c
1
dir.c
|
@ -1729,6 +1729,7 @@ dir_foreach(VALUE io, VALUE dirname)
|
|||
{
|
||||
VALUE dir;
|
||||
|
||||
RETURN_ENUMERATOR(io, 1, &dirname);
|
||||
dir = dir_open_dir(dirname);
|
||||
rb_ensure(dir_each, dir, dir_close, dir);
|
||||
return Qnil;
|
||||
|
|
Загрузка…
Ссылка в новой задаче