Skip to content

Instantly share code, notes, and snippets.

@keithrbennett
Created May 19, 2014 15:28
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 keithrbennett/c2d8c96cf5abbb947820 to your computer and use it in GitHub Desktop.
Save keithrbennett/c2d8c96cf5abbb947820 to your computer and use it in GitHub Desktop.
class Base
def initialize(thing)
puts thing
end
end
class Derived < Base
def initialize(a_thing)
super()
end
end
Derived.new
# print:
# ➜ temp ruby s.rb
# ArgumentError: wrong number of arguments calling `initialize` (0 for 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment