F
Filipe
I have the following situation:
class MyClass
def setVar(var,varValue)
var=varValue
end
def initialize
@myVar=0
setVar(@myVar,1)
puts(@myVar.to_s)
end
end
test = MyClass.new
Unfortunately, this piece of code is returning 0 instead of the 1 I
would expect. Is there anything I could do?
Thanks in advance
class MyClass
def setVar(var,varValue)
var=varValue
end
def initialize
@myVar=0
setVar(@myVar,1)
puts(@myVar.to_s)
end
end
test = MyClass.new
Unfortunately, this piece of code is returning 0 instead of the 1 I
would expect. Is there anything I could do?
Thanks in advance