Skip to content

Instantly share code, notes, and snippets.

@calavera
Created April 18, 2012 02:13
Show Gist options
  • Save calavera/2410610 to your computer and use it in GitHub Desktop.
Save calavera/2410610 to your computer and use it in GitHub Desktop.
1.9.3p0 :013 > foo = "bar"
=> "bar"
1.9.3p0 :014 > foo.is_a? String
=> true
1.9.3p0 :015 > foo < String
ArgumentError: comparison of String with Class failed
from (irb):15:in `<'
from (irb):15
from /Users/david/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>'
1.9.3p0 :016 > klass = Class.new
=> #<Class:0x00000100be4eb0>
1.9.3p0 :017 > klass.is_a? Class
=> true
1.9.3p0 :018 > klass < Class
=> nil
1.9.3p0 :019 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment