From: SonOfLilit Date: 2007-02-20T04:36:58+09:00 Subject: Re: For loops don't count down http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/38910 It's really easy: compose 'http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/' << n.to_s or google for "ruby-talk " << n.to_s On 2/19/07, Robert Dober wrote: > On 2/19/07, dblack@wobblini.net wrote: > > Hi -- > > > > On Tue, 20 Feb 2007, Robert Dober wrote: > > > > > On 2/19/07, Yukihiro Matsumoto wrote: > > >> Hi, > > >> > > >> In message "Re: For loops don't count down" > > >> on Tue, 20 Feb 2007 02:45:27 +0900, Daniel Schierbeck > > >> writes: > > >> > > >> |Is there a necessity for a range such as 5..0 to be empty? > > >> > > >> 5..1 is the easiest case, > > > No it is not, how could we distinguish between a "reversed" range and > > > an "empty" range. > > > but what if "abz".."abc" where we couldn't > > >> define reasonable String#pred. Just raise error? > > > With all due respect if we have a reasonable String#succ we can define > > > a reasonable String#pred. > > > > See the thread starting at ruby-talk 38910 for an earlier discussion > > of this. It's not easy, and it's arbitrary and of questionable > > usefulness. (I don't think ranges need to be any more array-like than > > they already are -- possibly less.) > > I do not like the lack of symmetry it just feels not right. > I have mixed feelings about String#succ (can be convenient for sure > and very confusing too). > It is no good though to say String#pred will be the same mess, well > than let us remove String#succ too (unfortunately I guess that would > brake too much code.) > I'd like to have a look at the thread though (long time ago, or did I > miss it?) only that the N� is not really good enough for me to find > it. > > Sorry if I am the nasty guy again :( > > Cheers > Robert > > > > > > > > David > > > > -- > > Q. What is THE Ruby book for Rails developers? > > A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) > > (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) > > Q. Where can I get Ruby/Rails on-site training, consulting, coaching? > > A. Ruby Power and Light, LLC (http://www.rubypal.com) > > > > > > > -- > We have not succeeded in answering all of our questions. > In fact, in some ways, we are more confused than ever. > But we feel we are confused on a higher level and about more important things. > -Anonymous > >