From: David Brady Date: 2005-08-25T01:26:23+09:00 Subject: Re: [QUIZ] Sodoku Solver (#43) [SOLUTION] Gavin Kistner wrote: > On Aug 24, 2005, at 7:36 AM, James Edward Gray II wrote: > >> line.delete!("+-| ") > > Oooh, I didn't know/forgot about that method. Nice :) These are all new to me. I learned Ruby by skimming the manual for the syntax needed to express my C++ thinking in Ruby. :-) When I discovered gsub! took a regex, I went back and reread some of the String documentation. I was going to use line.squeeze ' ' But line.delete is more clear. I'll probably still use gsub! before it, because to my thinking the proper behavior is to throw away all characters that aren't digits. Dono... we're into "proper parsing of invalid input" at this point. I only squeeze the whitespace because I was using split() to break up the input. That may be unecessary (split /\s+/) or avoidable (remove all whitespace, iterate over chars). James, I'll edit the code, because these are nice changes. I hate to spam the list, but I'm assuming that reposting is the preferred way to update code for the Quiz, since you simply reference the web archive of the post directly? -dB -- David Brady ruby_talk@shinybit.com I'm feeling really surreal today... OR AM I?