Skip to content

Instantly share code, notes, and snippets.

@xnnyygn
Created September 16, 2016 10:27
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 xnnyygn/aad75f569b20ec6d77463d0db859fb59 to your computer and use it in GitHub Desktop.
Save xnnyygn/aad75f569b20ec6d77463d0db859fb59 to your computer and use it in GitHub Desktop.
class Foo
INSTANCE = Foo.new(1)
def initialize(arg0)
@arg0 = arg0
end
end
# run me in irb, and you will get this error
# ArgumentError: wrong number of arguments (1 for 0)
# from (irb):2:in `initialize'
# from (irb):2:in `new'
# from (irb):2:in `<class:Foo>'
# from (irb):1
# from /Users/xnnyygn/.rvm/rubies/ruby-2.1.5/bin/irb:11:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment