Ruby - Classes and Objects
Identify the error in this Ruby code:
class Car
def start
puts 'Starting engine'
# missing end here
car = Car.new
car.startIdentify the error in this Ruby code:
class Car
def start
puts 'Starting engine'
# missing end here
car = Car.new
car.startstart is missing its closing end keyword.end. Missing it causes a SyntaxError.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions