Permalink
Browse files

converts the mode argument with #to_str in IO.new

  • Loading branch information...
Watson1978 committed Jun 26, 2012
1 parent c32d867 commit c1cc109799651b5ecd0addec7e8406d1a8c84a83
Showing with 1 addition and 0 deletions.
  1. +1 −0 io.c
View
1 io.c
@@ -3496,6 +3496,7 @@ rb_io_initialize(VALUE io, SEL sel, int argc, VALUE *argv)
}
ofmode = convert_oflags_to_fmode(oflags);
+ mode = rb_check_string_type(mode);
if (NIL_P(mode)) {
mode_flags = ofmode;
}

0 comments on commit c1cc109

Please sign in to comment.