Project

General

Profile

Bug #16853

Updated by sylvain.joyeux (Sylvain Joyeux) over 4 years ago

The following code 

 ~~~ 
 def codedef bla(hash = {}, **kw) 
     puts "H: #{hash}" 
     puts "K: #{kw}" 
 end 

 bla "some" => "string" 
 ~~~ 

 **silently** outputs the following (no warnings about deprecation of keyword parameters-from-hash) 

 ~~~ 
 H: {} 
 K: {"some"=>"string"} 
 ~~~ 

 While 2.6.5 (and versions before it) gave 

 ~~~ 
 H: {"some"=>"string"} 
 K: {} 
 ~~~ 

 I would expect "the warning" that started appearing in 2.7, and **definitely** not having strings in a keyword argument hash.

Back