aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-29 11:50:28 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-29 11:50:28 +0900
commit5ca51ddde81cd7f338d0dd495ceb8569def60647 (patch)
tree61eac3e77397fc9b22abdc02b9732f3d0bfb1c7e /bignum.c
parent27765a75025d3e13d512b52dd3755ec1e7da004f (diff)
downloadruby-5ca51ddde81cd7f338d0dd495ceb8569def60647.tar.gz
[DOC] Integer#coerce deals with also Float
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bignum.c b/bignum.c
index c5592a14ae..4ab117b557 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6730,14 +6730,15 @@ rb_big_hash(VALUE x)
/*
* 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]
*/