From: Sean Chittenden Date: 2003-02-11T07:51:04+09:00 Subject: Re: value of assignment (Re: Order of the value of an expression changed? (PR#579)) > |I have read the thread and I think this is a pretty bad change. I > |can't find an instance where this would be the desired result. When > |every other expression in Ruby evaluates from right to left, why do > |assignment statements always have a value of the right most value? > > That's how assignment works. I just made it consistent for attribute > access too. Can I reiterate how absolutely, fundamentally broken this change is and how much of a departure from the "everything is a method call" elegance that once used to exist? Chaining methods and return values used to be one of the simplest and most elegant things about Ruby. #BEGIN test.rb str = '' # snip XML dtd/doc root = XML::Parser.new().string=(str).root node_set = root.pointer('xpointer(id("two"))') node_set.each{|n| p n} #END test.rb % ruby test.rb test.rb:10: undefined method `root' for # (NoMethodError) *grump* I'll stop pouting now, but I think this was a step in the wrong direction. -sc -- Sean Chittenden