From: "Mauricio Fernández" Date: 2003-02-06T18:00:10+09:00 Subject: Re: Local variables & blocks On Thu, Feb 06, 2003 at 08:55:30AM +0900, Brian Candler wrote: > If you're writing threaded code, you will have to use a trick to get > thread-local variables: > > def local # something like this will be > yield # built into the language > end > > Thread.new { > local { |a,b,c| > ... a,b,c are local > } > } Some sugar? Thread.new(*args) { |args| { |a,b,c| .... args contains arguments .... a, b, c are local }} At any rate, we're adding some kind of declaration to Ruby :-| -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Turn right here. No! NO! The OTHER right!