[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: clear understanding of |=
From:       Matt Armstrong <matt () lickey ! com>
Date:       2002-12-31 22:29:38
[Download RAW message or body]

Tom Sawyer <transami@transami.net> writes:

> i've never seen an exact explination of ||= and i want to be clear about it.
>
> 	x ||= y
>
> means
>
> 	x = x || y

Yes.


> which is equiv. to
>
> 	x = x ? x : y

Yes, for ||= y but not += or others (clearly).
    

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic