From: "Bartosz Dziewoński" Date: 2012-04-21T21:54:19+09:00 Subject: Re: What does '||=' mean? W dniu 21 kwietnia 2012 14:39 użytkownik Peter Zotov napisał: > The info on that link is incorrect or outdated. On recent Rubies like 1.9.3 > the nil guard explicitly does not show a warning if the variable did not > exist > beforehand. Check it yourself: > > $ ruby -W2 -e '@ivar ||= 1' > $ ruby -W2 -e '@ivar = @ivar || 1' > -e:1: warning: instance variable @ivar not initialized It does warn for me in both cases. I'm running ruby 1.9.3p0 (2011-10-30) [i386-mingw32] on Windows XP SP3. -- Matma Rex