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
This commit is contained in:
parent
1f8765bb2b
commit
e7209358b9
2
io.c
2
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user