Project

General

Profile

Actions

Bug #15078

closed

Hash splat of empty hash should not create a positional argument.

Added by marcandre (Marc-Andre Lafortune) over 5 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-08-27 trunk 64545) [x86_64-darwin15]
[ruby-core:88867]

Description

Looks like #10856 is not completely fixed, but I can't reopen it

def foo(*args); args; end
foo(**{}) # => []
foo(**Hash.new) # => [{}], should be []

Related issues 5 (0 open5 closed)

Related to Ruby master - Bug #10856: Splat with empty keyword args gives unexpected resultsClosednobu (Nobuyoshi Nakada)Actions
Related to Ruby master - Bug #15052: must not optimize `foo(**{})` outClosedActions
Related to Ruby master - Feature #14183: "Real" keyword argumentClosedActions
Has duplicate Ruby master - Bug #15956: `{*nil}` causes confusing error messageClosedActions
Has duplicate Ruby master - Bug #15957: Splatting nil as **kwargsClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0