Just
a[3...7] = ['B','B','B','B'].

Works at least in 1.9.2.

2011/3/18 Ruby Fan <sweensonti / garrifulio.mailexpire.com>

> a = ["A","A","A","A","A", "A","A","A","A","A"]
> a[3...7] = "B"
>
> QUESTION:
> after code executes a = ["A", "A", "A", "B", "A", "A", "A"]
> what should I do to make a = ["A", "A", "A", "B", "B", "B", "B", "A",
> "A", "A"]
>
> --
> Posted via http://www.ruby-forum.com/.
>
>