Project

General

Profile

Actions

Bug #14611

closed

Exotic method parameters bug

Added by bogdan (Bogdan Gusiev) about 6 years ago. Updated about 6 years ago.

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

Description

Consider the following code:

def test(_, x, *_)
  x
end

test(1,2,3) # => nil

By some reason second parameter is nil when the rest of parameters declared as not used.


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #15457: Weird behaviour when having multiple arguments of same name and splat operatorClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0