Created
          July 31, 2012 11:09 
        
      - 
      
- 
        Save ik5/3216241 to your computer and use it in GitHub Desktop. 
    case that works
  
        
  
    
      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
    
  
  
    
  | a = {'one' => 1 } | |
| puts "a.class = #{a.class}" | |
| case a | |
| when Hash | |
| puts 'Hash' | |
| else | |
| puts 'not Hash' | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment