Skip to content

Instantly share code, notes, and snippets.

@maasha
Last active August 29, 2015 14:19
Show Gist options
  • Save maasha/051dc361e3cc7aab646c to your computer and use it in GitHub Desktop.
Save maasha/051dc361e3cc7aab646c to your computer and use it in GitHub Desktop.
wat?
#!/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