diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-08 08:59:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-08 08:59:00 +0000 |
commit | e7209358b946493310abc3c4178b945b26b80bcf (patch) | |
tree | 58747bfd08ca61188310e19ea749ff45669d3de0 | |
parent | 1f8765bb2b62d533c0779c854c2b77cc021093b4 (diff) | |
download | ruby-e7209358b946493310abc3c4178b945b26b80bcf.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |