Michael W. Ryder wrote:
[...]
> But i.succ does Not work in the following:
> 
> i = 1
> while (i < 10)
>    puts i.succ
> end
> 
> the only way to get this to work is to use:
>    puts i; i = i.succ
> 
> which is not as clean as using puts i++.

This is unidiomatic Ruby.  In fact, it's becoming clear to me that just 
about *any* use case for postfix ++ is unidiomatic Ruby.  The cleanest 
way *in Ruby* of doing what you did would be

(1..10).each {|i| puts i}

Incrementing is handled under the hood.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen / marnen.org
-- 
Posted via http://www.ruby-forum.com/.