この例が失敗するのはなぜですか?
x = 100
y = 200
def my_method
puts "Current x/y: #{x}, #{y}" # fails to find x and y
x += 1 # fails to find x
y += 1 # fails to find y
end
この例が失敗するのはなぜですか?
x = 100
y = 200
def my_method
puts "Current x/y: #{x}, #{y}" # fails to find x and y
x += 1 # fails to find x
y += 1 # fails to find y
end