Skip to content

Commit

Permalink
converts the mode argument with #to_str in IO.new
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jun 26, 2012
1 parent c32d867 commit c1cc109
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions io.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit c1cc109

Please sign in to comment.