diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | io.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Tue Jul 24 10:37:04 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * io.c (rb_f_p): return nil if no argument. [ruby-dev:31285] + Tue Jul 24 01:05:07 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * regint.h (USE_MATCH_RANGE_IS_COMPLETE_RANGE): undef to achieve old @@ -3991,7 +3991,7 @@ rb_f_p(int argc, VALUE *argv, VALUE self) if (argc == 1) { ret = argv[0]; } - else { + else if (argc > 1) { ret = rb_ary_new4(argc, argv); } if (TYPE(rb_stdout) == T_FILE) { |