On Sun, May 19, 2013 at 8:41 AM, Felipe Contreras
> On Sun, May 19, 2013 at 10:13 AM, Ramkumar Ramachandra
> <artag...@gmail.com> wrote:
>> Felipe Contreras wrote:
>>> How exactly is it not equivalent to len = len || 1?
>> Here, I dug up an article for you on the issue:
>> Although it's fine in this case, I wouldn't recommend using ||=
>> because of the potential confusion.
> I don't see the confusion, 'len ||= 1' is *exactly* the same as 'len =
> 1 if not len', which is what I expected.
I spend more time in Python, C*, and Perl then in Ruby, and I was not
confused by this at all.
It behaves just like $foo ||= 1 does in Perl.
$ git grep '||=' | wc -l
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html