From: "Mariusz Pękala" Date: 2007-10-02T21:29:13+09:00 Subject: Re: a = b = c order of evaluation weird --HLsZ5Z1opAQvdr2J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-10-02 21:06:32 +0900 (Tue, Oct), Calamitas wrote: > My impression was that the OP knew what the evaluation order is, but > not why it is like that. >=20 > But anyway, my take on this is that >=20 > a[0..a.size/2] =3D a[a.size*2/3..-1] =3D nil >=20 > is equivalent to: >=20 > a.[]=3D(0..a.size/2, a.[]=3D(a.size*2/3..-1, nil)) >=20 > Arguments are evaluated left to right, completely explaining the > evaluation order the OP is seeing. I guess it's safer to say that the order of evaluating arguments is undefined, unless it is stated somewhere. Is it defined for ruby? --=20 A thousand words are worth a picture, and they load a heck of a lot faster. --HLsZ5Z1opAQvdr2J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7-ecc0.1.6 (GNU/Linux) iD8DBQFHAjj+snU0scoWZKARAoc1AJ0RFUcxRWBIrLP/LJDIT6eCbjnOCwCfRFiJ EZNHB9Dy1eJMU48QT7BFhZs= =PoQK -----END PGP SIGNATURE----- --HLsZ5Z1opAQvdr2J--