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 | 92feb0f1e95467b71131dd016d9b34e131716069 (patch) | |
tree | 58747bfd08ca61188310e19ea749ff45669d3de0 | |
parent | ec4a0e83b33ed4acfdd7673ca5e8c25b6075f735 (diff) | |
download | ruby-92feb0f1e95467b71131dd016d9b34e131716069.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; |