mruby-io/io.c: remove Ruby implementation of `IO#gets`
MODIFY
mrbgems/mruby-io/mrblib/io.rb
mrbgems/mruby-io/mrblib/io.rb
@@ -107,14 +107,6 @@ class IO
ungetc s
end
- def gets(*args)
- begin
- readline(*args)
- rescue EOFError
- nil
- end
- end
-
# 15.2.20.5.3
def each(&block)
return to_enum unless block

MODIFY
mrbgems/mruby-io/src/io.c
mrbgems/mruby-io/src/io.c
@@ -1884,7 +1884,7 @@ mrb_init_io(mrb_state *mrb)
mrb_define_method(mrb, io, "isatty", io_isatty, MRB_ARGS_NONE());
mrb_define_method(mrb, io, "eof?", io_eof, MRB_ARGS_NONE()); /* 15.2.20.5.6 */
mrb_define_method(mrb, io, "getc", io_getc, MRB_ARGS_NONE()); /* 15.2.20.5.8 */
- mrb_define_method(mrb, io, "gets", io_gets, MRB_ARGS_NONE()); /* 15.2.20.5.9 */
+ mrb_define_method(mrb, io, "gets", io_gets, MRB_ARGS_OPT(2)); /* 15.2.20.5.9 */
mrb_define_method(mrb, io, "read", io_read, MRB_ARGS_OPT(2)); /* 15.2.20.5.14 */
mrb_define_method(mrb, io, "readchar", io_readchar, MRB_ARGS_NONE()); /* 15.2.20.5.15 */
mrb_define_method(mrb, io, "readline", io_readline, MRB_ARGS_OPT(2)); /* 15.2.20.5.16 */

mruby-io/io.c: remove Ruby implementation of `IO#gets`