Skip to content

Commit

Permalink
[doc] Update Complex#to_r description
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkn committed Feb 22, 2024
1 parent 4b24ede commit 975ab25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion complex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,9 +1839,11 @@ nucomp_to_f(VALUE self)
*
* Complex.rect(1, 0).to_r # => (1/1)
* Complex.rect(1, Rational(0, 1)).to_r # => (1/1)
* Complex.rect(1, 0.0).to_r # => (1/1)
*
* Raises RangeError if <tt>self.imag</tt> is not exactly zero
* (either <tt>Integer(0)</tt> or <tt>Rational(0, _n_)</tt>).
* (either <tt>Integer(0)</tt> or <tt>Rational(0, _n_)</tt>)
* and <tt>self.imag.to_r</tt> is not exactly zero.
*
* Related: Complex#rationalize.
*/
Expand Down

0 comments on commit 975ab25

Please sign in to comment.