summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/io.c b/io.c
index c8de07f1e2..0b137ff795 100644
--- a/io.c
+++ b/io.c
@@ -3277,9 +3277,6 @@ rb_f_open(argc, argv)
if (rb_respond_to(argv[0], to_open)) {
VALUE io = rb_funcall2(argv[0], to_open, argc-1, argv+1);
- if (TYPE(io) != T_FILE) {
- rb_raise(rb_eTypeError, "to_open should return IO value");
- }
if (rb_block_given_p()) {
return rb_ensure(rb_yield, io, io_close, io);
}