Answer the question
In order to leave comments, you need to log in
Pointers in ruby - how does it work?
class Test1
def init
array = [VERY, BIG, ARRAY]
Test2.new(array).reread
end
end
class Test2
def initialize(array)
@array = array # ????
end
class Test2
def initialize(options)
options[:array]
end
end
@options = options[:array]
then this is reinitialization again, and as I understand it, the array will be overwritten into a new variable object?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question