U
uncutstone
Please take a look at following code and its result.
def geta(a)
a<<1<<2<<3<<4
end
def getb(b)
b=[7,8,9,10]
end
a=[]
b=[]
geta(a)
getb(b)
puts a.inspect
puts b.inspect
the result is:
[1, 2, 3, 4]
[]
def geta(a)
a<<1<<2<<3<<4
end
def getb(b)
b=[7,8,9,10]
end
a=[]
b=[]
geta(a)
getb(b)
puts a.inspect
puts b.inspect
the result is:
[1, 2, 3, 4]
[]