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

ruby-changes:70649

From: Nobuyoshi <ko1@a...>
Date: Wed, 29 Dec 2021 11:54:25 +0900 (JST)
Subject: [ruby-changes:70649] 5ca51ddde8 (master): [DOC] Integer#coerce deals with also Float

https://git.ruby-lang.org/ruby.git/commit/?id=5ca51ddde8

From 5ca51ddde81cd7f338d0dd495ceb8569def60647 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 29 Dec 2021 11:50:28 +0900
Subject: [DOC] Integer#coerce deals with also Float

---
 bignum.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/bignum.c b/bignum.c
index c5592a14aeb..4ab117b5579 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6730,14 +6730,15 @@ rb_big_hash(VALUE x) https://github.com/ruby/ruby/blob/trunk/bignum.c#L6730
 
 /*
  * call-seq:
- *   big.coerce(numeric)  ->  array
+ *   int.coerce(numeric)  ->  array
  *
- * Returns an array with both a +numeric+ and a +big+ represented as Bignum
- * objects.
+ * Returns an array with both a +numeric+ and a +int+ represented as
+ * Integer objects or Float objects.
  *
- * This is achieved by converting +numeric+ to a Bignum.
+ * This is achieved by converting +numeric+ to an Integer or a Float.
  *
- * A TypeError is raised if the +numeric+ is not a Fixnum or Bignum type.
+ * A TypeError is raised if the +numeric+ is not an Integer or a Float
+ * type.
  *
  *     (0x3FFFFFFFFFFFFFFF+1).coerce(42)   #=> [42, 4611686018427387904]
  */
-- 
cgit v1.2.1


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

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