summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-18 14:24:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-18 14:24:01 +0000
commita7a7324ea645b881658fb78d2e7e049f48970afd (patch)
tree99e97c4d2997df4e344a146d68847ec905fc5302 /error.c
parent9bb82109f75a89f5e43df066e60a1f2ee7977401 (diff)
* io.c (rb_io_s_new): block check moved from initialize to this
method. * io.c (rb_io_s_open): open should call initialize too. IO#for_fd also calls initialize. [new] * error.c (rb_sys_fail): replace INT2FIX() by INT2NUM() since errno value may not fit in Fixnum size on Hurd. * error.c (set_syserr): ditto. * dir.c (dir_s_glob): returns nil if block given. * io.c (rb_io_each_byte): should return self. * io.c (rb_io_close_m): close check added. * dir.c (dir_seek): should return pos. * parse.y (fixpos): orig may be (NODE*)1, which should not be dereferenced. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/error.c b/error.c
index c30374f75d..b6c330748d 100644
--- a/error.c
+++ b/error.c
@@ -526,7 +526,7 @@ set_syserr(i, name)
int ix, offset;
#endif
VALUE error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
- rb_define_const(error, "Errno", INT2FIX(i));
+ rb_define_const(error, "Errno", INT2NUM(i));
#ifdef __BEOS__
if (i == B_ERROR) {
syserr_error = error;
@@ -764,7 +764,7 @@ rb_sys_fail(mesg)
}
#endif
ee = rb_exc_new2(ee, buf);
- rb_iv_set(ee, "errno", INT2FIX(n));
+ rb_iv_set(ee, "errno", INT2NUM(n));
rb_exc_raise(ee);
}