diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-21 07:44:06 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-21 07:44:06 +0000 |
| commit | 351beb936151e3b8db286696829f04b31a3ef54a (patch) | |
| tree | 2758ad48fc996d8c09192dd87700cddfbce4a988 /dir.c | |
| parent | ff4a07d8dd10e2d2d05d1cbeed2a2839fa49ce08 (diff) | |
| download | ruby-351beb936151e3b8db286696829f04b31a3ef54a.tar.gz ruby-351beb936151e3b8db286696829f04b31a3ef54a.tar.xz ruby-351beb936151e3b8db286696829f04b31a3ef54a.zip | |
* eval.c (ruby_stop): should not trace error handler.
* signal.c (install_sighandler): do not install sighandler unless
the old value is SIG_DFL.
* io.c (io_write): should not raise exception on O_NONBLOCK io.
* dir.c (dir_set_pos): seek should return dir, pos= should not.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
| -rw-r--r-- | dir.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -389,13 +389,21 @@ dir_seek(dir, pos) #ifdef HAVE_SEEKDIR GetDIR(dir, dirp); seekdir(dirp->dir, NUM2INT(pos)); - return pos; + return dir; #else rb_notimplement(); #endif } static VALUE +dir_set_pos(dir, pos) + VALUE dir, pos; +{ + dir_seek(dir, pos); + return pos; +} + +static VALUE dir_rewind(dir) VALUE dir; { @@ -1004,7 +1012,7 @@ Init_Dir() 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,"pos=", dir_set_pos, 1); rb_define_method(rb_cDir,"close", dir_close, 0); rb_define_singleton_method(rb_cDir,"chdir", dir_s_chdir, -1); |
