From: Harry Kakueki Date: 2007-06-18T10:01:08+09:00 Subject: Re: [QUIZ] Mexican Blanket (#127) Problem On 6/18/07, Ari Brown wrote: > Hey all, > I was attempting Mexican Blanket today, and found it to be more of a > brain teaser (for me) than a coding problem. > > Which doesn't mean there were no coding problems. > > I keep getting an error for the Integer#times method. I think I'm > using it right, but could someone help me correct it please? > > ------------------------------------------------------------------| > mexican_blanket.rb:21:in `weave': undefined method `times' for > "25":String (NoMethodError) > from mexican_blanket.rb:15:in `initialize' > from mexican_blanket.rb:49:in `new' > from mexican_blanket.rb:49 > > ------------------------------------------------------------------| It looks like "25" is a String. You need to change it to an Integer. colors = ARGV[0] length = ARGV[1] width = ARGV[2] pattern_length = ARGV[3] p width.class # Add this line and take a look mexico = Blanket.new(colors, length, width, pattern_length) You may want to check the others, too. Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/