given the following code:
vars = instance_variables.map(&method(:instance_variable_get))
vars.each {|v| v = 123}
would that set @something = 123?
taking it a step further
is it the same if i have
vars = instance_variables.map(&method(:instance_variable_get))
vars.each {|v| doSomething(v) }
def doSomething(var)
var = 123
end
how would i mutate var from inside a function?