From: "Peña, Botp" Date: 2008-04-05T12:29:04+09:00 Subject: Re: The ||= assignment operator From: Chris Shea [mailto:cmshea@gmail.com] # It's better to think of x ||= "ruby" as x || x = "ruby". # # -- # h = Hash.new('default value') # # h[:test] ||= 'assigned value' # h # => {} # # # same as: # h[:test] || h[:test] = 'assigned value' # h # => {} # # # not: # h[:test] = h[:test] || 'assigned value' # h # => {:test=>"default value"} i'd say that's a bug in design (unless x+=1 is now x+x=1 ;) kind regards -botp