diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-13 06:44:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-13 06:44:42 +0000 |
commit | 2e23ebc601fd5c8d7de232e470e2374df8888d11 (patch) | |
tree | 15b69a971374cd5d1fd5413ba6d9d659f56c27f0 /dir.c | |
parent | be1fea072cd0d22788ef8a931c0c6b64a2503b5d (diff) |
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -570,6 +570,14 @@ dir_s_glob(dir, str) } if (buf != buffer) free(buf); + if (rb_iterator_p()) { + long len = RARRAY(ary)->len; + VALUE *ptr = RARRAY(ary)->ptr; + + while (len--) { + rb_yield(*ptr++); + } + } return ary; } |