summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-08 08:59:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-08 08:59:00 +0000
commite7209358b946493310abc3c4178b945b26b80bcf (patch)
tree58747bfd08ca61188310e19ea749ff45669d3de0
parent1f8765bb2b62d533c0779c854c2b77cc021093b4 (diff)
io.c: check if Integer
* io.c (rb_file_initialize): check if fd is an Integer but not a Fixnum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index d3c6392fa2..980f8232bf 100644
--- a/io.c
+++ b/io.c
@@ -7716,7 +7716,7 @@ rb_file_initialize(int argc, VALUE *argv, VALUE io)
rb_raise(rb_eRuntimeError, "reinitializing File");
}
if (0 < argc && argc < 3) {
- VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
+ VALUE fd = rb_check_to_int(argv[0]);
if (!NIL_P(fd)) {
argv[0] = fd;