[ruby-core:88863] [Ruby trunk Bug#13336][Closed] Default Parameters don't work

From: ruby-core@...
Date: 2018-09-05 15:26:00 UTC
List: ruby-core #88863
Issue #13336 has been updated by marcandre (Marc-Andre Lafortune).

Status changed from Open to Closed

This is a duplicate of #12717, so closing this.

----------------------------------------
Bug #13336: Default Parameters don't work
https://bugs.ruby-lang.org/issues/13336#change-73901

* Author: [email protected] (Herbert Bonaffini)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.3.1
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
```ruby
def funny(a = true, b: nil)
  p a
end

funny([1,2,3]) # => [1,2,3]

funny({k:1}) # => in `funny': unknown keyword: k (ArgumentError)
```

---Files--------------------------------
hello_bug.rb (132 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next