You're right, and that is the behavior in Ruby 1.9.
I posted the example I did so that those unfamiliar with Ruby would see that the parent was a contrived example to use upto in that context. Sure it's awkward b/c it's not the intended semantics of the upto method, hence the ambiguity.
Maybe an ideal language would not introduce that sort of ambiguity... I personally slightly perfer the 1.9 syntax.
I posted the example I did so that those unfamiliar with Ruby would see that the parent was a contrived example to use upto in that context. Sure it's awkward b/c it's not the intended semantics of the upto method, hence the ambiguity.
Maybe an ideal language would not introduce that sort of ambiguity... I personally slightly perfer the 1.9 syntax.