Created
September 16, 2016 10:27
-
-
Save xnnyygn/aad75f569b20ec6d77463d0db859fb59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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