From: 7stud -- Date: 2009-05-06T08:09:41+09:00 Subject: Re: '=||' Eleanor McHugh wrote: > Are you referring to ||= ? If so it's one of the augmented assignment > operators so you won't find it documented separately as it's syntactic > sugar for: > > x = x || some_other_value > > Nope. h = Hash.new(10) h["red"] = h["red"] || 20 --output:-- {"red"=>10} h = Hash.new(10) h["blue"] ||= 20 p h --output:-- {} The statement: x ||= val is actually equivalent to: x = val unless x -- Posted via http://www.ruby-forum.com/.