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

ruby-changes:54480

From: kazu <ko1@a...>
Date: Thu, 3 Jan 2019 14:51:24 +0900 (JST)
Subject: [ruby-changes:54480] kazu:r66695 (trunk): [DOC] Add `or nil` to call-seq [ci skip]

kazu	2019-01-03 14:51:18 +0900 (Thu, 03 Jan 2019)

  New Revision: 66695

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66695

  Log:
    [DOC] Add `or nil` to call-seq [ci skip]

  Modified files:
    trunk/complex.c
    trunk/object.c
    trunk/rational.c
Index: rational.c
===================================================================
--- rational.c	(revision 66694)
+++ rational.c	(revision 66695)
@@ -529,8 +529,8 @@ static VALUE nurat_s_convert(int argc, V https://github.com/ruby/ruby/blob/trunk/rational.c#L529
 
 /*
  * call-seq:
- *    Rational(x, y, exception: true)  ->  rational
- *    Rational(arg, exception: true)   ->  rational
+ *    Rational(x, y, exception: true)  ->  rational or nil
+ *    Rational(arg, exception: true)   ->  rational or nil
  *
  * Returns +x/y+ or +arg+ as a Rational.
  *
Index: complex.c
===================================================================
--- complex.c	(revision 66694)
+++ complex.c	(revision 66695)
@@ -419,7 +419,7 @@ static VALUE nucomp_s_convert(int argc, https://github.com/ruby/ruby/blob/trunk/complex.c#L419
 
 /*
  * call-seq:
- *    Complex(x[, y], exception: false)  ->  numeric
+ *    Complex(x[, y], exception: false)  ->  numeric or nil
  *
  * Returns x+i*y;
  *
Index: object.c
===================================================================
--- object.c	(revision 66694)
+++ object.c	(revision 66695)
@@ -3221,7 +3221,7 @@ opts_exception_p(VALUE opts) https://github.com/ruby/ruby/blob/trunk/object.c#L3221
 
 /*
  *  call-seq:
- *     Integer(arg, base=0, exception: true)    -> integer
+ *     Integer(arg, base=0, exception: true)    -> integer or nil
  *
  *  Converts <i>arg</i> to an <code>Integer</code>.
  *  Numeric types are converted directly (with floating point numbers
@@ -3583,7 +3583,7 @@ rb_Float(VALUE val) https://github.com/ruby/ruby/blob/trunk/object.c#L3583
 
 /*
  *  call-seq:
- *     Float(arg, exception: true)    -> float
+ *     Float(arg, exception: true)    -> float or nil
  *
  *  Returns <i>arg</i> converted to a float. Numeric types are converted
  *  directly, and with exception to string and nil the rest are converted using <i>arg</i>.to_f.

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

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