From: Chris Game Date: 2005-08-01T19:26:03+09:00 Subject: Re: Loading data (variables) Christian Neukirchen wrote: > Chris Game writes: > >> Christian Neukirchen wrote: >> >>> echo "test = 12; BEGIN { p $SAFE }" > data.rb >> >> So what's this BEGIN {..} stuff do then? > > It gets executed before the $SAFE = 4 line that is getting > prepended. If there is malicious code in BEGIN {}, you lose. > >> Chris Game Thanks - but does it always get executed before other lines which go through the eval(..) statement in irb? It looks like irb executes all lines in order. -- Chris Game "Chance favors only the prepared mind." -- Louis Pasteur