From 513436e5b29776ed26777699d19f0acf4fa1c36a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 1 Jul 2013 06:42:58 -0600 Subject: [PATCH] fix arity checking of `call-with-file-lock/timeout' --- racket/lib/collects/racket/file.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/racket/lib/collects/racket/file.rkt b/racket/lib/collects/racket/file.rkt index e9178117d1..ee15301a73 100644 --- a/racket/lib/collects/racket/file.rkt +++ b/racket/lib/collects/racket/file.rkt @@ -246,9 +246,9 @@ (raise-argument-error 'call-with-file-lock/timeout "(or/c path-string? #f)" fn)) (unless (or (eq? kind 'shared) (eq? kind 'exclusive)) (raise-argument-error 'call-with-file-lock/timeout "(or/c 'shared 'exclusive)" kind)) - (unless (and (procedure? thunk) (= (procedure-arity thunk) 0)) + (unless (and (procedure? thunk) (procedure-arity-includes? thunk 0)) (raise-argument-error 'call-with-file-lock/timeout "(-> any)" thunk)) - (unless (and (procedure? thunk) (= (procedure-arity failure-thunk) 0)) + (unless (and (procedure? thunk) (procedure-arity-includes? failure-thunk 0)) (raise-argument-error 'call-with-file-lock/timeout "(-> any)" failure-thunk)) (unless (or (not lock-file) (path-string? lock-file)) (raise-argument-error 'call-with-file-lock/timeout "(or/c path-string? #f)" lock-file))