Skip to content

Instantly share code, notes, and snippets.

@stopthink
Created April 30, 2010 04:28
Show Gist options
  • Save stopthink/384741 to your computer and use it in GitHub Desktop.
Save stopthink/384741 to your computer and use it in GitHub Desktop.
class Bicycle
attr_reader :gears, :wheels, :seats
def intialize(gears = 1)
@wheels = 2
@seats = 1
@gears = gears
end
end
class Tandem < Bicycle
def initialize(gears)
super
@seats = 2
end
end
bike = Tandem.new(10)
@stopthink
Copy link
Author

bike.rb:13:in initialize': wrong number of arguments(1 for 0) (ArgumentError) from bike.rb:13:ininitialize'
from bike.rb:18:in new' from bike.rb:18:in

'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment