Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > f22816f60c70b4ed050a9b9016d91db0 > files > 47

ruby-doc-1.8.6-9p114mdv2008.1.x86_64.rpm

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Programming Ruby: The Pragmatic Programmer's Guide</title>
    <link rel="StyleSheet" href="pr_style.css" type="text/css" media="screen">
  </head>
  <body bgcolor="white">
    <table bgcolor="#c09090" cellpadding="3" border="0" cellspacing="0" width="100%">
      <tr>
        <td colspan="3">
          <table bgcolor="#701a1a" cellpadding="20" width="100%">
            <tr>
              <td width="6in">
                <h1 class="header">Programming Ruby</h1>
                <h3 class="subheader">The Pragmatic Programmer's Guide</h3>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="33%" align="left">
          <a class="subheader" href="ref_c_module.html">Previous &lt;</a>
        </td>
        <td width="33%" align="center" valign="middle">
          <a class="subheader" href="builtins.html">Contents ^</a>
          <br>
        </td>
        <td width="33%" align="right">
          <a class="subheader" href="ref_c_numeric.html">Next &gt;</a>
          <br>
        </td>
      </tr>
    </table>
<!--
Copyright (c) 2001 by Addison Wesley Longman, Inc. This material may
be distributed only subject to the terms and conditions set forth in
the Open Publication License, v1.0 or later (the latest version is
presently available at http://www.opencontent.org/openpub/).
<P></P>
Distribution of substantively modified versions of this document is
prohibited without the explicit permission of the copyright holder.
<P></P>
Distribution of the work or derivative of the work in any standard
(paper) book form is prohibited unless prior permission is obtained
from the copyright holder.
-->
<table>
      <tr>
        <td height="20"><img src="dot.gif" width="1" height="20"></td>
      </tr>
    </table>
    <table border="0" width="100%" bgcolor="660066" cellpadding="10">
      <tr>
        <td valign="center">
          <font color="white" size="7">class NilClass</font>
        </td>
        <td>
          <table border="0">
            <tr>
              <td>
                <font color="white">
                Parent:
              </font>
              </td>
              <td>
                <font color="white">Object</font>
              </td>
            </tr>
            <tr>
              <td>
                <font color="white">
                Version:
              </font>
              </td>
              <td>
                <font color="white">
               1.6
              </font>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <p></p>
    <H3>Index:</H3>
    <i>
      <a href="#NilClass._et">&amp;</a>
    </i> <i>
      <a href="#NilClass._up">^</a>
    </i> <i>
      <a href="#NilClass._ba">|</a>
    </i> <i>
      <a href="#NilClass.nil_qm">nil?</a>
    </i> <i>
      <a href="#NilClass.to_a">to_a</a>
    </i> <i>
      <a href="#NilClass.to_i">to_i</a>
    </i> <i>
      <a href="#NilClass.to_s">to_s</a>
    </i> <p></p>
    <hr>
    The class of the singleton object <code>nil</code>.
<P></P>
  <table border="0" width="100%" cellpadding="10">
      <tr>
        <td valign="center" colspan="2" bgcolor="990066">
          <font color="white" size="6">instance methods
       </font>
        </td>
      </tr>
      <tr>
        <td valign="center" bgcolor="#ff9999">
          <font size="4">
            <b>
              <a name="NilClass._et">&amp;</a>
            </b>
          </font>
        </td>
        <td bgcolor="#ffaaaa">
        <code>nil</code>&amp; <i>anObject</i>
        -&gt; <code>false</code>
      </td>
      </tr>
      <td></td>
      <td>
<P></P>
      And---Returns <code>false</code>. As <i>anObject</i> is an
      argument to a method call, it is always evaluated; there is no
      short-circuit evaluation in this case.
<P></P>

<table class="codebox" cellspacing="0" border="0" cellpadding="3" width="400">
          <tr>
            <td>
              <pre>
nil&nbsp;&amp;&amp;&nbsp;puts("logical&nbsp;and")
nil&nbsp;&amp;&nbsp;&nbsp;puts("and")
</pre>
            </td>
          </tr>
        </table>

<em>produces:</em>
<table class="codebox" cellspacing="0" border="0" cellpadding="3" width="400">
          <tr>
            <td>
              <pre>
and
</pre>
            </td>
          </tr>
        </table>

<P></P>
      </td>
      <tr>
        <td valign="center" bgcolor="#ff9999">
          <font size="4">
            <b>
              <a name="NilClass._up">^</a>
            </b>
          </font>
        </td>
        <td bgcolor="#ffaaaa">
        <code>nil</code>^ <i>anObject</i>
        -&gt; <code>true</code> or <code>false</code>
      </td>
      </tr>
      <td></td>
      <td>
<P></P>
      Exclusive Or---Returns <code>false</code> if <i>anObject</i> is <code>nil</code> or
      <code>false</code>, 
      <code>true</code> otherwise.
<P></P>
      </td>
      <tr>
        <td valign="center" bgcolor="#ff9999">
          <font size="4">
            <b>
              <a name="NilClass._ba">|</a>
            </b>
          </font>
        </td>
        <td bgcolor="#ffaaaa">
        <code>nil</code>| <i>anObject</i>
        -&gt; <code>true</code> or <code>false</code>
      </td>
      </tr>
      <td></td>
      <td>
<P></P>
      Or---Returns <code>false</code> if <i>anObject</i> is
      <code>nil</code> or <code>false</code>, <code>true</code> otherwise.
<P></P>
      </td>
      <tr>
        <td valign="center" bgcolor="#ff9999">
          <font size="4">
            <b>
              <a name="NilClass.nil_qm">nil?</a>
            </b>
          </font>
        </td>
        <td bgcolor="#ffaaaa">
        <code>nil</code>.nil? -&gt; <code>true</code>
      </td>
      </tr>
      <td></td>
      <td>
<P></P>
      Always returns <code>true</code>.
<P></P>
      </td>
      <tr>
        <td valign="center" bgcolor="#ff9999">
          <font size="4">
            <b>
              <a name="NilClass.to_a">to_a</a>
            </b>
          </font>
        </td>
        <td bgcolor="#ffaaaa">
        <code>nil</code>.to_a -&gt; []
      </td>
      </tr>
      <td></td>
      <td>
<P></P>
      Always returns an empty array.
<P></P>
      </td>
      <tr>
        <td valign="center" bgcolor="#ff9999">
          <font size="4">
            <b>
              <a name="NilClass.to_i">to_i</a>
            </b>
          </font>
        </td>
        <td bgcolor="#ffaaaa">
        <code>nil</code>.to_i -&gt; 0
      </td>
      </tr>
      <td></td>
      <td>
<P></P>
      Always returns zero.
<P></P>
      </td>
      <tr>
        <td valign="center" bgcolor="#ff9999">
          <font size="4">
            <b>
              <a name="NilClass.to_s">to_s</a>
            </b>
          </font>
        </td>
        <td bgcolor="#ffaaaa">
        <code>nil</code>.to_s -&gt; ""
      </td>
      </tr>
      <td></td>
      <td>
<P></P>
      Always returns the empty string.
<P></P>
      </td>
    </table>
<P></P>

<p></p>
    <hr>
    <table bgcolor="#a03030" cellpadding="10" border="0" cellspacing="0">
      <tr>
        <td width="33%" align="left">
          <a class="subheader" href="ref_c_module.html">Previous &lt;</a>
        </td>
        <td width="33%" align="center" valign="middle">
          <a class="subheader" href="builtins.html">Contents ^</a>
          <br>
        </td>
        <td width="33%" align="right">
          <a class="subheader" href="ref_c_numeric.html">Next &gt;</a>
          <br>
        </td>
      </tr>
    </table>
    <p></p>
    <font size="-1">Extracted from the book "Programming Ruby -
     The Pragmatic Programmer's Guide"</font>
    <br>
    <font size="-3">
      Copyright
      &#169;
2001 by Addison Wesley Longman, Inc. This material may
be distributed only subject to the terms and conditions set forth in
the Open Publication License, v1.0 or later (the latest version is
presently available at
      <a href="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</a>)).
        <p></p>
Distribution of substantively modified versions of this document is
prohibited without the explicit permission of the copyright holder.
          <p></p>
Distribution of the work or derivative of the work in any standard
(paper) book form is prohibited unless prior permission is obtained
from the copyright holder.
        <br>
    </font>
  </body>
</html>