Hi,

In message "integer method question"
    on 02/01/31, "r . h a r l o s" <quadzero / users.sourceforge.net> writes:

|Hi, all.  I'm just learning Ruby and already I've come across a situation
|that I don't understand.
|
|In irb, if I type:
|   2.upto(5) { |n| print n, "-" | }
|
|I expect to see:
|   2-3-4-5-
|
|but instead I see:
|   2-3-4-5-2

Your input generates your expected result "2-3-4-5-", then printed the
result of the input "2".  That's how irb works.

							matz.