Hi,
In message "Re: Specifying local and external block parameters (that old chestnut)"
on 02/10/04, "Hal E. Fulton" <hal9000 / hypermetrics.com> writes:
| 0.upto(99) {|frame.scroll| sleep 0.1}
| x,i = nil
| myobj.each_with_index do |x,i|
| # process...
| break if some_condition
| # more processing...
| end
|
| last_obj = x
| last_index = i
Yes, they are problems. With the "solution" described in [ruby-talk:52440],
you have to rewrite them as following respectively.
> 0.upto(99) {|x| frame.scroll = x; sleep 0.1}
> myobj.each_with_index do |x,i|
> # process...
> if some_condition
> last_obj = x
> last_index = i
> break
> end
> # more processing...
> end
matz.