summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index a152010c204..f5115c4b296 100644
--- a/marshal.c
+++ b/marshal.c
@@ -446,7 +446,7 @@ marshal_dump(argc, argv)
port = 0;
rb_scan_args(argc, argv, "12", &obj, &a1, &a2);
if (argc == 3) {
- limit = NUM2INT(a2);
+ if (!NIL_P(a2)) limit = NUM2INT(a2);
port = a1;
}
else if (argc == 2) {