Project

General

Profile

Backport #8236

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

=begin 
  ``` 
 class Base 
    
   def foo(*args) 
      
     p args 
    
   end 
  
 end 

  

 class A < Base 
    
   def foo(arg, bar: 'x') 
      
     super 
    
   end 
  
 end 
  
 A.new.foo 42 # => [42, {:bar=>"x"}]    (ok) 

  

 class B < Base 
    
   def foo(*args, bar: 'x') 
      
     super 
    
   end 
  
 end 
  
 B.new.foo 42 # => [[42], [:bar, "x"]]    (not ok, should be same) 
 =end 
 ```

Back