The following method call improperly captures the result of "baz" and passes it and the result of "bar" as the 2nd and 3rd arguments:
def foo(a, b, c, d)
p [a, b, c, d]
end
def bar = [1, 2]
def baz = 6
foo(0, *(baz; bar), 3)
This should output [0, 1, 2, 3] but instead it outputs [0, 6, [1, 2], 3].
It affects both 9.4 and 10, in both interpreter and JIT, so it appears to be a bug in IR compilation.
This causes most net-imap tests to fail because of the following line:
https://github.com/ruby/net-imap/blob/e58aff64d55dda4215fa0cfd7f4d1ea7b9ca51ba/lib/net/imap/response_parser.rb#L804
The TaggedResponse gets initialized with bogus values, which causes the imap client to terminate early because the response is not valid.
The following method call improperly captures the result of "baz" and passes it and the result of "bar" as the 2nd and 3rd arguments:
This should output
[0, 1, 2, 3]but instead it outputs[0, 6, [1, 2], 3].It affects both 9.4 and 10, in both interpreter and JIT, so it appears to be a bug in IR compilation.
This causes most net-imap tests to fail because of the following line:
https://github.com/ruby/net-imap/blob/e58aff64d55dda4215fa0cfd7f4d1ea7b9ca51ba/lib/net/imap/response_parser.rb#L804
The
TaggedResponsegets initialized with bogus values, which causes the imap client to terminate early because the response is not valid.