Skip to content

Commit

Permalink
Fix bug #56
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-ard committed Aug 6, 2024
1 parent 7f96c19 commit 11ddf83
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rsc.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@
ctx
(length args)
(gen-call
(if (number? v)
(if (and (number? v) (arity-check? ctx first))
(+ v 1)
v)
cont))))))
Expand Down
2 changes: 2 additions & 0 deletions src/tests/00-ribbit/35-eval.scm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

;;;run: -l min -f+ arity-check
;;;run: -l max -f+ arity-check
;;;run: -l min
;;;run: -l max
;;;r4rs-run: -l r4rs
;;;input:(* 6 7)
;;;expected:
Expand Down
1 change: 1 addition & 0 deletions src/tests/00-ribbit/50-repl.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
(repl)

;;;run: -l max -f+ arity-check
;;;run: -l max
;;;r4rs-run: -l r4rs
;;;input:(define fact (lambda (n) (if (< n 2) 1 (* n (fact (- n 1))))))(fact 10)
;;;expected:
Expand Down
1 change: 1 addition & 0 deletions src/tests/00-ribbit/90-macros.scm
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@


;;;run: -l define-macro -f+ arity-check
;;;run: -l define-macro
;;;expected:
;;;ABCDEF

0 comments on commit 11ddf83

Please sign in to comment.