Skip to content

Fix JS-compatible callback arity for Array methods#9

Merged
memburg merged 1 commit into
mainfrom
bugfix-8-js-callback-arity
May 26, 2026
Merged

Fix JS-compatible callback arity for Array methods#9
memburg merged 1 commit into
mainfrom
bugfix-8-js-callback-arity

Conversation

@memburg
Copy link
Copy Markdown
Owner

@memburg memburg commented May 26, 2026

What changed

  • Normalized callback arguments for user-defined callbacks in array callback methods
  • Implemented JS-compatible behavior: extra arguments are ignored, missing arguments are passed as undefined
  • Added regression specs for callback arity compatibility including map(function(x) { ... })
  • Documented callback argument behavior in reference docs

Validation

  • Ran crystal spec

Closes #8

@memburg memburg merged commit bdee821 into main May 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Array callbacks fail when function declares fewer params

1 participant