From: Tobias Reif Date: 2002-02-27T08:48:33+09:00 Subject: Re: RCR?: parallel to until: as_soon_as David Alan Black wrote: > Wouldn't this hang, since @line_count isn't being changed? I'm not sure if this could work in Ruby, but I want to be able to fire a block as soon as something happens. So @line_count is changed in various places in the program, and the as_soon_as block watches it; as soon it reaches 100, the block is fired. as_soon_as button.pressed? # ... turns true stuff.do end as_soon_as chat_peer.online? say hi end as_soon_as game_state.changed? all_players.update_screen end ... But I'm still thinking myself ... Tobi -- * peace&love. * http://www.pinkjuice.com/