I’m coming to ruby mainly from python background.
a = b = range(10)
will yields two names pointing to the same object
but in ruby
a = b = Range.new(0,9)
will yield two two distinct objects.
To get the effect of the python line in ruby it seems I have to do:
b = Range.new(0,9)
a = b
What’s the logic behind that?