summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io.c b/io.c
index 19c588497a..3482602326 100644
--- a/io.c
+++ b/io.c
@@ -655,13 +655,13 @@ rb_io_get_fptr(VALUE io)
VALUE
rb_io_get_io(VALUE io)
{
- return rb_convert_type(io, T_FILE, "IO", "to_io");
+ return rb_convert_type_with_id(io, T_FILE, "IO", idTo_io);
}
VALUE
rb_io_check_io(VALUE io)
{
- return rb_check_convert_type(io, T_FILE, "IO", "to_io");
+ return rb_check_convert_type_with_id(io, T_FILE, "IO", idTo_io);
}
VALUE
@@ -9938,7 +9938,7 @@ open_key_args(int argc, VALUE *argv, VALUE opt, struct foreach_arg *arg)
VALUE args;
long n;
- v = rb_convert_type(v, T_ARRAY, "Array", "to_ary");
+ v = rb_convert_type_with_id(v, T_ARRAY, "Array", idTo_ary);
n = RARRAY_LEN(v) + 1;
#if SIZEOF_LONG > SIZEOF_INT
if (n > INT_MAX) {