From: David Vallner Date: 2006-11-22T20:06:29+09:00 Subject: Re: [OT] Bug in ruby? --------------enigAE0DCD69AD8736E4596C0D0E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Leslie Viljoen wrote: > On 11/22/06, David Vallner wrote: >> Also, see previous post. At any given point in time, there's several >> variables that point to nil in the interpreter, and the culprit is als= o >> usually an expression. Finding the possible expressions that returned = a >> nil would require tracing back to the literal in the stack frames, and= >> even then the last one wouldn't have to be the cause of the problem. I= >> stand by my point that this is not the job of a core language runtime,= >> but of manual or automated code review. >=20 > It just seems like it would be easier than that, since Ruby is an > interpreter. Doesn't the last sub-expression get stored in a string > somewhere as the expression is parsed? >=20 Probably not, to my best knowledge, a source file is always tokenized and parsed into an AST before interpreting. The interpreter would have to do extra work to reconstruct the last expression, which might not really be helpful always, or even in most cases. (Someone with more information on the interpreter's internals could say this with more authority.) David Vallner --------------enigAE0DCD69AD8736E4596C0D0E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFZC8ty6MhrS8astoRAj7uAJ44DC10DF24CgOgMwA6Uluu4OrVmgCfa3ry Dh309YxFA1UKzYSz12i59fg= =Amwm -----END PGP SIGNATURE----- --------------enigAE0DCD69AD8736E4596C0D0E--