From: Harry Ohlsen Date: 2001-12-13T00:04:47+09:00 Subject: [ruby-talk:28346] Re: Reviews solicited for Ruby article In article <005801c18307$0fab2a50$eaa0a118@credenza>, "Bill Kelly" wrote: > Alternately, > > counts = Hash.new(0) > text.scan(/[A-Z]/).each {|c| counts[c] += 1} > > would possibly be fun to include in addition to the text.each_byte > approach . . . . sort of a footnote to convey some of Ruby's > versatility? I like it! That's precisely the sort of thing I was looking for. As I explained to Stephan, I was trying to keep the example simple and long-winded, so I had a few features to discuss. However, I'd like to put this version immediately after it, saying something like ... "and now the ruby way" :-). > I'd agree with these suggestions too. Yes. I did, too. I wasn't really happy with the example, because I was torn between trying to write clean code and trying to keep it simple. I think I succeeded much better in one direction than the other!