From: "Mauricio Fernández" Date: 2003-08-18T16:58:20+09:00 Subject: Re: Bug when rerouting String#gsub with a block using $1? On Mon, Aug 18, 2003 at 04:47:47PM +0900, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Bug when rerouting String#gsub with a block using $1?" > on 03/08/18, Mauricio Fern�ndez writes: > > | "hello world".gsub(/(\w+)/) { print $1; $1 }; print "\n" > | > |Is this just impossible to do in Ruby? > > In pure Ruby, yes. ouch. We'll then need C to make real Junctions then (not so bad since we'd do it anyway for speed). > Ah, wait. If you don't need thread safety, you can do it as: Thank you for your quick responses. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Steal my cash, car and TV - but leave the computer! -- Soenke Lange