aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index cda216789b..b108b20705 100644
--- a/io.c
+++ b/io.c
@@ -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) {