[DOC] Fix example in Numeric#to_int

This commit is contained in:
BurdetteLamar 2024-12-17 10:34:19 -06:00 committed by Peter Zhu
parent 6bf7a1765f
commit 9715131c32
Notes: git 2024-12-17 18:01:57 +00:00

View File

@ -857,7 +857,7 @@ num_nonzero_p(VALUE num)
* Rational(1, 2).to_int # => 0
* Rational(2, 1).to_int # => 2
* Complex(2, 0).to_int # => 2
* Complex(2, 1) # Raises RangeError (non-zero imaginary part)
* Complex(2, 1).to_int # Raises RangeError (non-zero imaginary part)
*
*/