summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-10-07 17:57:44 +0900
committerNobuyoshi Nakada <[email protected]>2024-10-07 18:22:19 +0900
commit66b69d4ea553485306b683d7f965181dffca5205 (patch)
tree0446984d386edb18823921c365a6ec638a86279e /numeric.c
parent7081838d2a6b64308161e46296dec5dcea01f789 (diff)
[DOC] Move each `Float#to_s` example item by item
Like as +half+ option in Float#round. If the body of the preceding list items and the following code block are indented at the same position, the code block is parsed as a list continuation. [Fixes GH-11683]
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/numeric.c b/numeric.c
index ef7a39dc48..7e0e8f480f 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1047,16 +1047,15 @@ rb_float_new_in_heap(double d)
* may contain:
*
* - A fixed-point number.
+ * 3.14.to_s # => "3.14"
* - A number in "scientific notation" (containing an exponent).
+ * (10.1**50).to_s # => "1.644631821843879e+50"
* - 'Infinity'.
+ * (10.1**500).to_s # => "Infinity"
* - '-Infinity'.
+ * (-10.1**500).to_s # => "-Infinity"
* - 'NaN' (indicating not-a-number).
- *
- * 3.14.to_s # => "3.14"
- * (10.1**50).to_s # => "1.644631821843879e+50"
- * (10.1**500).to_s # => "Infinity"
- * (-10.1**500).to_s # => "-Infinity"
- * (0.0/0.0).to_s # => "NaN"
+ * (0.0/0.0).to_s # => "NaN"
*
*/