From: Rick DeNatale Date: 2007-10-31T20:17:27+09:00 Subject: Re: Why, oh, why, little regexp? On 10/31/07, Brian Adkins wrote: > On Oct 30, 11:58 pm, Phrogz wrote: > > On Oct 30, 9:30 pm, Daniel Waite wrote: > > > > > That's clever use of ?a, which I recognize but have never seen anyone > > > use before. Thanks for the example! > > > > My current favorite use for the ?x syntax is converting single- > > character strings representing digits into their integer form: > > Yeah, so you can squeeze Ruby code into small places :) > > 1.upto(?d){|i|i%3<1&&x=:Fizz;puts i%5<1?"#{x}Buzz":x||i} Except under the upcoming revision (1.9) of the (Ruby) Rules of Golf, the R(uby)&A(ncient) has outlawed that usage, and instituted the penalty that ?d will no longer be 100, but "d". -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/