From: 7stud -- Newsgroups: comp.lang.ruby Subject: Re: pipe question Date: Tue, 5 Apr 2011 21:06:24 -0500 Organization: Service de news de lacave.net Lines: 15 Message-ID: <055d7420f4512beb655b878560afb345@ruby-forum.com> References: <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 1302055705 15013 65.111.164.187 (6 Apr 2011 02:08:25 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Wed, 6 Apr 2011 02:08:25 +0000 (UTC) In-Reply-To: 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: 381030 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <055d7420f4512beb655b878560afb345@ruby-forum.com> Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!feed.ac-versailles.fr!talisker.lacave.net!lacave.net!not-for-mail Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:2369 Josh Cheek wrote in post #990917: > > I probably never figured that out because it depends on the variable > type, > for example: > lhs = @rhs || "pass" # => "pass" > and > lhs = $rhs || "pass" # => "pass" Remember, by rule instance variables and global variables have a default value of nil. -- Posted via http://www.ruby-forum.com/.