From: Bertram Scharpf Date: 2007-10-02T23:09:27+09:00 Subject: Re: a = b = c order of evaluation weird Hi, Am Dienstag, 02. Okt 2007, 22:25:26 +0900 schrieb David A. Black: > This message is in MIME format. The first part should be readable text, > while the remaining parts are likely unreadable without MIME-aware tools. > On Tue, 2 Oct 2007, Mariusz P�~Ykala wrote: >> 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. >> >> 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? > > I believe that a subscript expression is always going to be evaluated > first: I never found it's good programming practice in any language to rely on evaluation order of function/method arguments. Understanding your own code will become unneccessarily hard. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de