diff options
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_sync.c b/thread_sync.c index e478a96b88..4a3cb2ad6a 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -517,7 +517,7 @@ mutex_sleep(int argc, VALUE *argv, VALUE self) { VALUE timeout; - rb_scan_args(argc, argv, "01", &timeout); + timeout = rb_check_arity(argc, 0, 1) ? argv[0] : Qnil; return rb_mutex_sleep(self, timeout); } |