Joel VanderWerf
11/1/2007 9:36:00 PM
Dale Smith wrote:
> irb(main):001:0> 1..10.each { |x| puts x }
> NoMethodError: undefined method 'each' for 10:Fixnum
> from (irb):1
> irb(main):002:0>
The problem is that `..' has lower precedence than `.'.
(1..10).each { |x| puts x }
I often forget the ( ) , and have to back up and insert them.
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407