From: rashworth Date: 2001-05-01T12:25:42+09:00 Subject: [ruby-talk:14475] Re: Large Matrix The map works fine, but I am not able to redefine map[2][2] = "a" ? and then print map ---------- Original Message ---------------------------------- From: Dave Thomas Reply-To: ruby-talk@ruby-lang.org Date: Tue, 1 May 2001 12:07:48 +0900 >"rashworth" writes: > >> What is the Ruby code to define a large matrix, 50 by 50 >> elements with each one equal to "+"? Thank you. ERA > > (1..50).map { (1..50).map { '+' } } > > ---------- Original Message ------------------------ From: Dave Thomas Reply-To: ruby-talk@ruby-lang.org Date: Tue, 1 May 2001 12:07:48 +0900 "rashworth" writes: > What is the Ruby code to define a large matrix, 50 by 50 > elements with each one equal to "+"? Thank you. ERA (1..50).map { (1..50).map { '+' } }