From: Robert Klemme Date: 2003-12-04T05:02:08+09:00 Subject: Re: strings and ranges schrieb im Newsbeitrag news:OF2A486F40.B193A772-ON88256DF1.00657564@milliman.com... > > > > > The following program doesn't execute as I would expect: > > #!/usr/bin/ruby > > stringy = "X" > > 1.upto(10) do |i| > puts stringy > stringy.succ! > end > > "X".upto("AG") do |ss| > puts ss > end > > puts "'AB' > 'AA' = #{'AB' > 'AA'}" > puts "'X' < 'AA' = #{'X' < 'AB'}" > > # The code below gets around my problem... > > stringy = "X" > while true > puts stringy > stringy.succ! > break if stringy == "AH" > end > > # Is there a better way? stringy = "X" until stringy == "AH" puts stringy stringy.succ! end robert