Skip to content

Instantly share code, notes, and snippets.

@fairchild
Created October 30, 2008 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fairchild/21173 to your computer and use it in GitHub Desktop.
Save fairchild/21173 to your computer and use it in GitHub Desktop.
ticket = Array.new
puts "$$ #{ticket.class}"
tick = case ticket.class
when Fixnum: 'Im a number'
when Array: "im an array"
else 'ELSE'
end
puts tick
if ticket.class == Array
puts "if says im an array"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment