Created
July 31, 2013 08:37
-
-
Save shunwen/6120379 to your computer and use it in GitHub Desktop.
Use #is_a? instead of #===
This file contains 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
omg = [1,2,3] | |
omg ===Array # => false | |
Array === omg # => true | |
omg.is_a? Array # => true | |
tmp = 1 | |
tmp.is_a? Array #=> false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment