From: wolf volpi Newsgroups: comp.lang.ruby Subject: pipe question Date: Sun, 3 Apr 2011 21:58:09 -0500 Organization: Service de news de lacave.net Lines: 13 Message-ID: <6351ecc5d2ac52f4b4c9d06ad2930f2c@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1301886063 14878 65.111.164.187 (4 Apr 2011 03:01:03 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Mon, 4 Apr 2011 03:01:03 +0000 (UTC) X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 380883 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <6351ecc5d2ac52f4b4c9d06ad2930f2c@ruby-forum.com> Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.stben.net!talisker.lacave.net!lacave.net!not-for-mail Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:2232 What does the pipe in this example do? @first_name = @first_name || '' According to the text book that this example came from, the code ensures that an instance variable is not nil. If @first_ name is nil, @first_ name is set to the empty string. Thank you. -- Posted via http://www.ruby-forum.com/.