From: Rick DeNatale Date: 2009-08-27T02:30:51+09:00 Subject: [ruby-core:25143] Is this an intentional change in 1.9? This came up on the ruby lang forum. This seems like a 1.9 bug. Is it? ---------- Forwarded message ---------- From: Aldric Giacomoni Date: Wed, Aug 26, 2009 at 11:00 AM Subject: ||= with 1.8 and 1.9 ? To: ruby-talk ML A friend of mine on Twitter recently posted this tidbit of code: class OrOrEquals �def test � �@test �end �def test=(test) � �@test = test � �'not test' �end end p (OrOrEquals.new.test = 'test') # ruby 1.8 returns 'test' # ruby 1.9 returns 'test' p (OrOrEquals.new.test ||= 'test') # ruby 1.8 returns 'test' # ruby 1.9 returns 'not test' It works as indicated. Is this -normal- behavior ? -- -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale