Skip to content

Instantly share code, notes, and snippets.

@agiliq
Created July 15, 2009 18:34
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 agiliq/147894 to your computer and use it in GitHub Desktop.
Save agiliq/147894 to your computer and use it in GitHub Desktop.
irb(main):001:0> nil
=> nil
irb(main):002:0> nil > 10
NoMethodError: undefined method `>' for nil:NilClass
from (irb):2
from :0
irb(main):003:0> 10 > nil
ArgumentError: comparison of Fixnum with nil failed
from (irb):3:in `>'
from (irb):3
from :0
irb(main):004:0> 10 < nil
ArgumentError: comparison of Fixnum with nil failed
from (irb):4:in `<'
from (irb):4
from :0
irb(main):005:0> 10 == nil
=> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment