[前][次][番号順一覧][スレッド一覧]

ruby-changes:32373

From: eregon <ko1@a...>
Date: Sat, 28 Dec 2013 22:22:49 +0900 (JST)
Subject: [ruby-changes:32373] eregon:r44452 (trunk): * object.c (Kernel#<=>) surround Comparable operators with <code> tags.

eregon	2013-12-28 22:22:42 +0900 (Sat, 28 Dec 2013)

  New Revision: 44452

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44452

  Log:
    * object.c (Kernel#<=>) surround Comparable operators with <code> tags.
      The #== method was hidden in ri/rdoc's output and was highlighting
      the line instead.

  Modified files:
    trunk/ChangeLog
    trunk/object.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44451)
+++ ChangeLog	(revision 44452)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec 28 22:21:59 2013  Benoit Daloze  <eregontp@g...>
+
+	* object.c (Kernel#<=>) surround Comparable operators with <code> tags.
+	  The #== method was hidden in ri/rdoc's output and was highlighting
+	  the line instead.
+
 Sat Dec 28 17:24:00 2013  DV Suresh  <e@d...>
 
 	* benchmark/bm_so_meteor_contest.rb: [DOC] Fix a few typos
Index: object.c
===================================================================
--- object.c	(revision 44451)
+++ object.c	(revision 44452)
@@ -1403,16 +1403,16 @@ rb_obj_not_match(VALUE obj1, VALUE obj2) https://github.com/ruby/ruby/blob/trunk/object.c#L1403
  *  Returns 0 if +obj+ and +other+ are the same object
  *  or <code>obj == other</code>, otherwise nil.
  *
- *  The <=> is used by various methods to compare objects, for example
+ *  The <code><=></code> is used by various methods to compare objects, for example
  *  Enumerable#sort, Enumerable#max etc.
  *
- *  Your implementation of <=> should return one of the following values: -1, 0,
+ *  Your implementation of <code><=></code> should return one of the following values: -1, 0,
  *  1 or nil. -1 means self is smaller than other. 0 means self is equal to other.
  *  1 means self is bigger than other. Nil means the two values could not be
  *  compared.
  *
- *  When you define <=>, you can include Comparable to gain the methods <=, <,
- *  ==, >=, > and between?.
+ *  When you define <code><=></code>, you can include Comparable to gain the methods
+ *  <code><=</code>, <code><</code>, <code>==</code>, <code>>=</code>, <code>></code> and <code>between?</code>.
  */
 static VALUE
 rb_obj_cmp(VALUE obj1, VALUE obj2)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]