mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
3fc7dd1858
`lambda {|a, b=nil|}.curry(3)` used to silently return a curried Proc;
CRuby raises `ArgumentError` because the lambda accepts at most 2 args.
Use `self.parameters` to compute the upper bound (count `:req`/`:opt`
entries, unbounded if `:rest`/`:keyrest` is present) and add the
corresponding range check alongside the existing minimum check.
close #2855
Co-authored-by: Claude <noreply@anthropic.com>