R
robin
Does the following code behave as you'd expect?
2.times{|n| i,j = n,i; puts "i=#{i}, j=#{j.inspect}"}
Can you explain why j is nil rather than 0, the second time round?
Thanks,
Robin
2.times{|n| i,j = n,i; puts "i=#{i}, j=#{j.inspect}"}
Can you explain why j is nil rather than 0, the second time round?
Thanks,
Robin