Project

General

Profile

Actions

Bug #20204

closed

3.3.0 YJIT rises TypeError instead of ArgumentError with some incorrect calls

Added by alanwu (Alan Wu) 6 months ago. Updated about 2 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:116374]

Description

Test with:

def foo(a, *) = a

def call(args, &)
  foo(1)
  foo(*args, &)
end

call([1, 2])
call([])
$ ruby ../test.rb
../test.rb:1:in `foo': wrong number of arguments (given 0, expected 1+) (ArgumentError)
$ ruby --yjit-call-threshold=1 ../test.rb
../test.rb:5:in `call': wrong argument type Array (expected Proc) (TypeError)
Actions

Also available in: Atom PDF

Like0
Like0Like0