From: Roger Pack Date: 2009-05-29T03:44:03+09:00 Subject: Re: Strange ruby-1.9.1 array substitution answer > It's a bug. They either fixed it in a more recent version or it's a > Windows > specific issue. On my Mac it works as expected: > > $ ruby1.9 -v > ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9] > > $ irb >>> arr = [1,2,3,4,5] > => [1, 2, 3, 4, 5] >>> arr[0,2] = nil > => nil >>> arr > => [3, 4, 5] Here's what I get in Linux with TRUNK. >> RUBY_DESCRIPTION => "ruby 1.9.2dev (2009-05-28 trunk 23601) [i686-linux]" >> arr = [1,2,3,4,5] => [1, 2, 3, 4, 5] >> arr[0,2] = nil => nil >> arr => [nil, 3, 4, 5] maybe macs are special? "Guess we're not cool enough" (from commercial). Just kidding. Take care. -=r -- Posted via http://www.ruby-forum.com/.