summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-05 06:40:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-05 06:40:50 +0000
commit25443ab13b5e1ca433e8cac7ba5a15300bad3eaa (patch)
tree85afcc4a2e1075c4d7ccc5094743bc66cc9f0d22 /io.c
parent3f9fd4191bb3c85267cff81c2d4f494cbaa97e80 (diff)
* eval.c (rb_add_method): should not call rb_secure(), for
last_func may not be set. * io.c (rb_io_ctl): ioctl should accept any integer within C long range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io.c b/io.c
index 79118b073a..35c043b676 100644
--- a/io.c
+++ b/io.c
@@ -2842,6 +2842,9 @@ rb_io_ctl(io, req, arg, io_p)
else if (arg == Qtrue) {
narg = 1;
}
+ else if (rb_obj_is_kind_of(arg, rb_cInteger)) {
+ narg = NUM2LONG(arg);
+ }
else {
Check_Type(arg, T_STRING);