Ruby - Metaprogramming Fundamentals
Identify the issue in this Ruby code snippet:
class Car
def initialize
@speed = 0
end
def set_speed(value)
instance_variable_set(:speed, value)
end
end
car = Car.new
car.set_speed(50)
puts car.instance_variable_get(:@speed)