summaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-12 07:48:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-12 07:48:31 +0000
commit2bc48ec00f2ee0028c1a5096aa676391820b87ec (patch)
treef89e9e7746e75343a2886ee50fc23a37f9fe5886 /dir.c
parentce6c53d24d361f589169ffa49360e93be8c994a3 (diff)
downloadruby-2bc48ec00f2ee0028c1a5096aa676391820b87ec.tar.gz
ruby-2bc48ec00f2ee0028c1a5096aa676391820b87ec.tar.xz
ruby-2bc48ec00f2ee0028c1a5096aa676391820b87ec.zip
2000-06-12
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 6792ab639..a3006f5d0 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);