Arrays store references to objects, when you initialize array that way - you get an array with 10 references to the same string. Then you modify the string.
The reason is illustrated with the following code:
irb(main):021:0> (0..10).each.map { |i| arr[i] = "*" }
=> ["*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*"]
irb(main):022:0> arr[0].equal? arr[1]
=> false # first object is NOT equal to second object (different objects)
irb(main):023:0> arr=["*"]*10
=> ["*", "*", "*", "*", "*", "*", "*", "*", "*", "*"]
irb(main):024:0> arr[0].equal? arr[1]
=> true # first object IS equal to second object (same object)
Basically, when you do arr=["*"]*10 you're literally putting the exact same String object into all array slots. Whereas, (0..10).each.map { |i| arr[i] = "*" } is creating a new String object for each element in the array.