Created
          April 3, 2020 14:18 
        
      - 
      
 - 
        
Save sugamasao/701a65464376bf682e70de086966ecf4 to your computer and use it in GitHub Desktop.  
    Ruby 2.7のhashの警告動作
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def bar(h, **kwargs) | |
| p h, kwargs | |
| end | |
| # warning | |
| bar(k: 42) | |
| bar({k: 42}, {k2: 10}) | |
| # ok | |
| bar({k: 42}) | |
| bar({k: 42}, k2: 10) | |
| bar({k: 42}, **{k2: 10}) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment