<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -688,6 +688,20 @@ rb_big2str(x, base)
     return ss;
 }
 
+/*
+ *  call-seq:
+ *     big.to_s(base=10)   =&gt;  string
+ *  
+ *  Returns a string containing the representation of &lt;i&gt;big&lt;/i&gt; radix
+ *  &lt;i&gt;base&lt;/i&gt; (2 through 36).
+ *     
+ *     12345654321.to_s         #=&gt; &quot;12345654321&quot;
+ *     12345654321.to_s(2)      #=&gt; &quot;1011011111110110111011110000110001&quot;
+ *     12345654321.to_s(8)      #=&gt; &quot;133766736061&quot;
+ *     12345654321.to_s(16)     #=&gt; &quot;2dfdbbc31&quot;
+ *     78546939656932.to_s(36)  #=&gt; &quot;rubyrules&quot;
+ */
+
 static VALUE
 rb_big_to_s(argc, argv, x)
     int argc;
@@ -935,6 +949,13 @@ rb_big_eql(x, y)
     return Qtrue;
 }
 
+/*
+ * call-seq:
+ *    -big   =&gt;  other_big
+ *
+ * Unary minus (returns a new Bignum whose value is 0-big)
+ */
+
 static VALUE
 rb_big_uminus(x)
     VALUE x;
@@ -1054,6 +1075,13 @@ bigadd(x, y, sign)
     return z;
 }
 
+/*
+ *  call-seq:
+ *     big + other  =&gt; Numeric
+ *
+ *  Adds big and other, returning the result.
+ */
+
 VALUE
 rb_big_plus(x, y)
     VALUE x, y;
@@ -1073,6 +1101,13 @@ rb_big_plus(x, y)
     }
 }
 
+/*
+ *  call-seq:
+ *     big - other  =&gt; Numeric
+ *
+ *  Subtracts other from big, returning the result.
+ */
+
 VALUE
 rb_big_minus(x, y)
     VALUE x, y;
@@ -1092,6 +1127,13 @@ rb_big_minus(x, y)
     }
 }
 
+/*
+ *  call-seq:
+ *     big * other  =&gt; Numeric
+ *
+ *  Multiplies big and other, returning the result.
+ */
+
 VALUE
 rb_big_mul(x, y)
     VALUE x, y;
@@ -1287,6 +1329,14 @@ bigdivmod(x, y, divp, modp)
     }
 }
 
+/*
+ *  call-seq:
+ *     big / other     =&gt; Numeric
+ *     big.div(other)  =&gt; Numeric
+ *
+ *  Divides big by other, returning the result.
+ */
+
 static VALUE
 rb_big_div(x, y)
     VALUE x, y;
@@ -1312,6 +1362,15 @@ rb_big_div(x, y)
     return bignorm(z);
 }
 
+/*
+ *  call-seq:
+ *     big % other         =&gt; Numeric
+ *     big.modulo(other)   =&gt; Numeric
+ *
+ *  Returns big modulo other. See Numeric.divmod for more
+ *  information.
+ */
+
 static VALUE
 rb_big_modulo(x, y)
     VALUE x, y;
@@ -1334,6 +1393,15 @@ rb_big_modulo(x, y)
     return bignorm(z);
 }
 
+/*
+ *  call-seq:
+ *     big.remainder(numeric)    =&gt; number
+ *  
+ *  Returns the remainder after dividing &lt;i&gt;big&lt;/i&gt; by &lt;i&gt;numeric&lt;/i&gt;.
+ *     
+ *     -1234567890987654321.remainder(13731)      #=&gt; -6966
+ *     -1234567890987654321.remainder(13731.24)   #=&gt; -9906.22531493148
+ */
 static VALUE
 rb_big_remainder(x, y)
     VALUE x, y;
@@ -1356,6 +1424,13 @@ rb_big_remainder(x, y)
     return bignorm(z);
 }
 
+/*
+ *  call-seq:
+ *     big.divmod(numeric)   =&gt; array
+ *  
+ *  See &lt;code&gt;Numeric#divmod&lt;/code&gt;.
+ *     
+ */
 VALUE
 rb_big_divmod(x, y)
     VALUE x, y;
@@ -1378,6 +1453,18 @@ rb_big_divmod(x, y)
     return rb_assoc_new(bignorm(div), bignorm(mod));
 }
 
+/*
+ *  call-seq:
+ *     big.quo(numeric) -&gt; float
+ *  
+ *  Returns the floating point result of dividing &lt;i&gt;big&lt;/i&gt; by
+ *  &lt;i&gt;numeric&lt;/i&gt;.
+ *     
+ *     -1234567890987654321.quo(13731)      #=&gt; -89910996357705.5
+ *     -1234567890987654321.quo(13731.24)   #=&gt; -89909424858035.7
+ *     
+ */
+
 static VALUE
 rb_big_quo(x, y)
     VALUE x, y;
@@ -1404,6 +1491,19 @@ rb_big_quo(x, y)
     return rb_float_new(dx / dy);
 }
 
+/*
+ *  call-seq:
+ *     big ** exponent   #=&gt; numeric
+ *
+ *  Raises _big_ to the _exponent_ power (which may be an integer, float,
+ *  or anything that will coerce to a number). The result may be
+ *  a Fixnum, Bignum, or Float
+ *
+ *    123456789 ** 2      #=&gt; 15241578750190521
+ *    123456789 ** 1.2    #=&gt; 5126464716.09932
+ *    123456789 ** -2     #=&gt; 6.5610001194102e-17
+ */
+
 VALUE
 rb_big_pow(x, y)
     VALUE x, y;
@@ -1447,6 +1547,13 @@ rb_big_pow(x, y)
     return rb_float_new(pow(rb_big2dbl(x), d));
 }
 
+/*
+ * call-seq:
+ *     big &amp; numeric   =&gt;  integer
+ *
+ * Performs bitwise +and+ between _big_ and _numeric_.
+ */
+
 VALUE
 rb_big_and(x, y)
     VALUE x, y;
@@ -1716,6 +1823,10 @@ rb_big_hash(x)
     return LONG2FIX(key);
 }
 
+/*
+ * MISSING: documentation
+ */
+
 static VALUE
 rb_big_coerce(x, y)
     VALUE x, y;
@@ -1768,6 +1879,24 @@ rb_big_size(big)
     return LONG2FIX(RBIGNUM(big)-&gt;len*SIZEOF_BDIGITS);
 }
 
+/*
+ *  Bignum objects hold integers outside the range of
+ *  Fixnum. Bignum objects are created
+ *  automatically when integer calculations would otherwise overflow a
+ *  Fixnum. When a calculation involving
+ *  Bignum objects returns a result that will fit in a
+ *  Fixnum, the result is automatically converted.
+ *     
+ *  For the purposes of the bitwise operations and &lt;code&gt;[]&lt;/code&gt;, a
+ *  Bignum is treated as if it were an infinite-length
+ *  bitstring with 2's complement representation.
+ *     
+ *  While Fixnum values are immediate, Bignum
+ *  objects are not---assignment and parameter passing work with
+ *  references to objects, not the objects themselves.
+ *     
+ */
+
 void
 Init_Bignum()
 {</diff>
      <filename>bignum.c</filename>
    </modified>
    <modified>
      <diff>@@ -69,6 +69,15 @@ cmp_failed()
     return Qnil;
 }
 
+/*
+ *  call-seq:
+ *     obj == other    =&gt; true or false
+ *  
+ *  Compares two objects based on the receiver's &lt;code&gt;&lt;=&gt;&lt;/code&gt;
+ *  method, returning true if it returns 0. Also returns true if
+ *  _obj_ and _other_ are the same object.
+ */
+
 static VALUE
 cmp_equal(x, y)
     VALUE x, y;
@@ -81,6 +90,14 @@ cmp_equal(x, y)
     return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
 }
 
+/*
+ *  call-seq:
+ *     obj &gt; other    =&gt; true or false
+ *  
+ *  Compares two objects based on the receiver's &lt;code&gt;&lt;=&gt;&lt;/code&gt;
+ *  method, returning true if it returns 1.
+ */
+
 static VALUE
 cmp_gt(x, y)
     VALUE x, y;
@@ -92,6 +109,14 @@ cmp_gt(x, y)
     return Qfalse;
 }
 
+/*
+ *  call-seq:
+ *     obj &gt;= other    =&gt; true or false
+ *  
+ *  Compares two objects based on the receiver's &lt;code&gt;&lt;=&gt;&lt;/code&gt;
+ *  method, returning true if it returns 0 or 1.
+ */
+
 static VALUE
 cmp_ge(x, y)
     VALUE x, y;
@@ -103,6 +128,14 @@ cmp_ge(x, y)
     return Qfalse;
 }
 
+/*
+ *  call-seq:
+ *     obj &lt; other    =&gt; true or false
+ *  
+ *  Compares two objects based on the receiver's &lt;code&gt;&lt;=&gt;&lt;/code&gt;
+ *  method, returning true if it returns -1.
+ */
+
 static VALUE
 cmp_lt(x, y)
     VALUE x, y;
@@ -114,6 +147,15 @@ cmp_lt(x, y)
     return Qfalse;
 }
 
+
+/*
+ *  call-seq:
+ *     obj &lt;= other    =&gt; true or false
+ *  
+ *  Compares two objects based on the receiver's &lt;code&gt;&lt;=&gt;&lt;/code&gt;
+ *  method, returning true if it returns -1 or 0.
+ */
+
 static VALUE
 cmp_le(x, y)
     VALUE x, y;
@@ -125,6 +167,21 @@ cmp_le(x, y)
     return Qfalse;
 }
 
+/*
+ *  call-seq:
+ *     obj.between?(min, max)    =&gt; true or false
+ *  
+ *  Returns &lt;code&gt;false&lt;/code&gt; if &lt;i&gt;obj&lt;/i&gt; &lt;code&gt;&lt;=&gt;&lt;/code&gt;
+ *  &lt;i&gt;min&lt;/i&gt; is less than zero or if &lt;i&gt;anObject&lt;/i&gt; &lt;code&gt;&lt;=&gt;&lt;/code&gt;
+ *  &lt;i&gt;max&lt;/i&gt; is greater than zero, &lt;code&gt;true&lt;/code&gt; otherwise.
+ *     
+ *     3.between?(1, 5)               #=&gt; true
+ *     6.between?(1, 5)               #=&gt; false
+ *     'cat'.between?('ant', 'dog')   #=&gt; true
+ *     'gnu'.between?('ant', 'dog')   #=&gt; false
+ *     
+ */
+
 static VALUE
 cmp_between(x, min, max)
     VALUE x, min, max;
@@ -134,6 +191,43 @@ cmp_between(x, min, max)
     return Qtrue;
 }
 
+/*
+ *  The &lt;code&gt;Comparable&lt;/code&gt; mixin is used by classes whose objects
+ *  may be ordered. The class must define the &lt;code&gt;&lt;=&gt;&lt;/code&gt; operator,
+ *  which compares the receiver against another object, returning -1, 0,
+ *  or +1 depending on whether the receiver is less than, equal to, or
+ *  greater than the other object. &lt;code&gt;Comparable&lt;/code&gt; uses
+ *  &lt;code&gt;&lt;=&gt;&lt;/code&gt; to implement the conventional comparison operators
+ *  (&lt;code&gt;&lt;&lt;/code&gt;, &lt;code&gt;&lt;=&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;&gt;=&lt;/code&gt;,
+ *  and &lt;code&gt;&gt;&lt;/code&gt;) and the method &lt;code&gt;between?&lt;/code&gt;.
+ *     
+ *     class SizeMatters
+ *       include Comparable
+ *       attr :str
+ *       def &lt;=&gt;(anOther)
+ *         str.size &lt;=&gt; anOther.str.size
+ *       end
+ *       def initialize(str)
+ *         @str = str
+ *       end
+ *       def inspect
+ *         @str
+ *       end
+ *     end
+ *     
+ *     s1 = SizeMatters.new(&quot;Z&quot;)
+ *     s2 = SizeMatters.new(&quot;YY&quot;)
+ *     s3 = SizeMatters.new(&quot;XXX&quot;)
+ *     s4 = SizeMatters.new(&quot;WWWW&quot;)
+ *     s5 = SizeMatters.new(&quot;VVVVV&quot;)
+ *     
+ *     s1 &lt; s2                       #=&gt; true
+ *     s4.between?(s1, s3)           #=&gt; false
+ *     s4.between?(s3, s5)           #=&gt; true
+ *     [ s3, s2, s5, s4, s1 ].sort   #=&gt; [Z, YY, XXX, WWWW, VVVVV]
+ *     
+ */
+
 void
 Init_Comparable()
 {</diff>
      <filename>compar.c</filename>
    </modified>
    <modified>
      <diff>@@ -236,7 +236,13 @@ module Generators
         namespace = rdr.top_level_namespace
         namespace = rdr.lookup_namespace_in(cls_desc.name, namespace)
         if namespace.empty?
-          raise RiError.new(&quot;Nothing known about #{arg}&quot;)
+          $stderr.puts &quot;You asked me to merge this source into existing &quot;
+          $stderr.puts &quot;documentation. This file references a class or &quot;
+          $stderr.puts &quot;module called #{cls_desc.name} which I don't&quot;
+          $stderr.puts &quot;have existing documentation for.&quot;
+          $stderr.puts 
+          $stderr.puts &quot;Perhaps you need to generate its documentation first&quot;
+          exit 1
         else
           old_cls = namespace[0]
         end</diff>
      <filename>lib/rdoc/generators/ri_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,29 +5,64 @@ require 'yaml'
 # tree. ri then reads these to generate the documentation
 
 module RI
-  Alias          = Struct.new(:old_name, :new_name)
-  AliasName      = Struct.new(:name)
-  Attribute      = Struct.new(:name, :rw, :comment)
-  Constant       = Struct.new(:name, :value, :comment)
-  IncludedModule = Struct.new(:name)
-  
-  class MethodSummary
-    attr_accessor :name
-    def initialize(name=&quot;&quot;)
+  class NamedThing
+    attr_reader :name
+    def initialize(name)
       @name = name
     end
-
     def &lt;=&gt;(other)
-      self.name &lt;=&gt; other.name
+      @name &lt;=&gt; other.name
+    end
+
+    def hash
+      @name.hash
+    end
+
+    def eql?(other)
+      @name.eql?(other)
     end
   end
 
+#  Alias          = Struct.new(:old_name, :new_name)
+
+  class AliasName &lt; NamedThing
+  end
+
+  class Attribute &lt; NamedThing
+    attr_reader :rw, :comment
+    def initialize(name, rw, comment)
+      super(name)
+      @rw = rw
+      @comment = comment
+    end
+  end
+
+  class Constant &lt; NamedThing
+    attr_reader :value, :comment
+    def initialize(name, value, comment)
+      super(name)
+      @value = value
+      @comment = comment
+    end
+  end
+
+  class IncludedModule &lt; NamedThing
+  end
+
+
+  class MethodSummary &lt; NamedThing
+    def initialize(name=&quot;&quot;)
+      super
+    end
+  end
+
+
 
   class Description
     attr_accessor :name
     attr_accessor :full_name
     attr_accessor :comment
-    
+
     def serialize
       self.to_yaml
     end
@@ -35,6 +70,10 @@ module RI
     def Description.deserialize(from)
       YAML.load(from)
     end
+
+    def &lt;=&gt;(other)
+      @name &lt;=&gt; other.name
+    end
   end
   
   class ClassDescription &lt; Description
@@ -48,11 +87,20 @@ module RI
 
     # merge in another class desscription into this one
     def merge_in(old)
-      @class_methods.concat(old.class_methods).sort!
-      @instance_methods.concat(old.instance_methods).sort!
-      @attributes.concat(old.attributes).sort!
-      @constants.concat(old.constants).sort!
-      @includes.concat(old.includes).sort!
+      merge(@class_methods, old.class_methods)
+      merge(@instance_methods, old.instance_methods)
+      merge(@attributes, old.attributes)
+      merge(@constants, old.constants)
+      merge(@includes, old.includes)
+    end
+
+    private
+
+    def merge(into, from)
+      names = {}
+      into.each {|i| names[i.name] = i }
+      from.each {|i| names[i.name] = i }
+      into.replace(names.keys.sort.map {|n| names[n]})
     end
   end
   </diff>
      <filename>lib/rdoc/ri/ri_descriptions.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>636e97ccb235af22c6a1137ae11c5ebda529cf4a</id>
    </parent>
  </parents>
  <author>
    <name>dave</name>
    <email>dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </author>
  <url>http://github.com/ice799/matzruby/commit/bf9cbdc73887a75781b9ec5780f9a908a5db6f49</url>
  <id>bf9cbdc73887a75781b9ec5780f9a908a5db6f49</id>
  <committed-date>2003-12-18T16:01:19-08:00</committed-date>
  <authored-date>2003-12-18T16:01:19-08:00</authored-date>
  <message>Fix dependency issue


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e</message>
  <tree>3f69040917e25ad5314c61c71dd9d767b03f3e17</tree>
  <committer>
    <name>dave</name>
    <email>dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
  </committer>
</commit>
