From: Yukihiro Matsumoto Date: 2006-09-18T16:27:21+09:00 Subject: Re: Splat, #to_ary and #to_a Hi, In message "Re: Splat, #to_ary and #to_a" on Mon, 18 Sep 2006 12:28:18 +0900, "Rick DeNatale" writes: |Just what is the fix in 1.9. | |Are you saying that |[*"foo\nbar"] #=> ["foo\nbar"] |in 1.9? Yes. And if you are curious you can try it by yourself. |How about: |[*(1..4)] |which in 1.8.x produces [1, 2, 3, 4] Currently, [1..4] This may be an issue. |and which of these will change in 1.9? | |def a(*arg) | p arg |end | |a("foo\nbar") |which in 1.8.4 prints ["foo\nbar"] ["foo\nbar"] |a((1..3)) | prints [1, 2, 3, 4] [1..3] |a(1..3) | prints [1..3] [1..3] |a(1..3, "foo\nbar") |prints [1..3, "foo\nbar"] [1..3, "foo\nbar"] |a(*"foo\nbar") |prints ["foo\n", "bar"] ["foo\nbar"] |a(*(1..4)) |prints [1, 2, 3, 4] [1..4] | *a = "foo\nbar" | a gets ["foo\nbar"] ["foo\nbar"] | *a = (1..4) | a gets [1..4] [1..4] | *a = "foo\nbar", (1..3) | a gets ["foo\nbar", 1..3] ["foo\nbar", 1..3] matz.