The map works fine, but I am not able to redefine map[2][2] = "a" ? and then print map ---------- Original Message ---------------------------------- From: Dave Thomas <Dave / PragmaticProgrammer.com> Reply-To: ruby-talk / ruby-lang.org Date: Tue, 1 May 2001 12:07:48 +0900 >"rashworth" <rashworth / mail.warpnet.net> 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 <Dave / PragmaticProgrammer.com> Reply-To: ruby-talk / ruby-lang.org Date: Tue, 1 May 2001 12:07:48 +0900 "rashworth" <rashworth / mail.warpnet.net> 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 { '+' } }