-
-
Save maasha/051dc361e3cc7aab646c to your computer and use it in GitHub Desktop.
wat?
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
#!/usr/bin/env ruby | |
case "foo".class | |
when String then puts "string" | |
when Array.class then puts "wrong" | |
when String.class then puts "ok" | |
else | |
puts "unknown" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment