Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2012 06:31
Show Gist options
  • Save anonymous/4316206 to your computer and use it in GitHub Desktop.
Save anonymous/4316206 to your computer and use it in GitHub Desktop.
irb(main):035:0> class NilClass
irb(main):036:1> def new
irb(main):037:2> return 7
irb(main):038:2> end
irb(main):039:1> end
=> nil
irb(main):040:0> a = NilClass.new
NoMethodError: undefined method `new' for NilClass:Class
from (irb):40
from C:/Ruby193/bin/irb:12:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment