From 548b5143db2c3d701520671ef1413cf3c39fcedf Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 12 Jun 2000 07:48:31 +0000 Subject: 2000-06-12 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 6792ab6390..a3006f5d0f 100644 --- a/dir.c +++ b/dir.c @@ -783,7 +783,8 @@ dir_foreach(io, dirname) VALUE dir; dir = rb_funcall(rb_cDir, rb_intern("open"), 1, dirname); - return rb_ensure(dir_each, dir, dir_close, dir); + rb_ensure(dir_each, dir, dir_close, dir); + return Qnil; } static VALUE @@ -814,6 +815,8 @@ Init_Dir() rb_define_method(rb_cDir,"rewind", dir_rewind, 0); rb_define_method(rb_cDir,"tell", dir_tell, 0); rb_define_method(rb_cDir,"seek", dir_seek, 1); + rb_define_method(rb_cDir,"pos", dir_tell, 0); + rb_define_method(rb_cDir,"pos=", dir_seek, 1); rb_define_method(rb_cDir,"close", dir_close, 0); rb_define_singleton_method(rb_cDir,"chdir", dir_s_chdir, -1); -- cgit v1.2.3