What does the ruby operator ||= in the following function do?

Posted by Milton K Benjamin on Stack Overflow See other posts from Stack Overflow or by Milton K Benjamin
Published on 2010-03-23T20:07:25Z Indexed on 2010/03/23 20:13 UTC
Read the original article Hit count: 278

Filed under:
|
def f1 
  @f1 ||= "abc"
end

© Stack Overflow or respective owner

Related posts about ruby

Related posts about rails