Project

General

Profile

Bug #10856

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

When keyword args are passed to a method with splat, and there are no keyword args, an empty hash is sent. I would expect no argument to be given, same as splat with an empty array. For example: 

 ```ruby 
 

     def foo 
 
     end 

 

     foo(**{}) 
 ``` 

 This causes an argument error, as an empty hash is passed. I would expect the same behavior as 

 ```ruby 
 

     def foo 
 
     end 

 

     foo(*[]) 
 ```

Back