File tree Expand file tree Collapse file tree 4 files changed +22
-9
lines changed
Expand file tree Collapse file tree 4 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -799,9 +799,9 @@ rb_complex_imag(VALUE self)
799799
800800/*
801801 * call-seq:
802- * -complex -> new_complex
802+ * -self -> complex
803803 *
804- * Returns the negation of +self+, which is the negation of each of its parts:
804+ * Returns +self+, negated , which is the negation of each of its parts:
805805 *
806806 * -Complex.rect(1, 2) # => (-1-2i)
807807 * -Complex.rect(-1, -2) # => (1+2i)
Original file line number Diff line number Diff line change @@ -576,7 +576,7 @@ num_imaginary(VALUE num)
576576 * call-seq:
577577 * -self -> numeric
578578 *
579- * Unary Minus--- Returns the receiver , negated.
579+ * Returns +self+ , negated.
580580 */
581581
582582static VALUE
Original file line number Diff line number Diff line change @@ -93,9 +93,14 @@ def +@
9393
9494class Integer
9595 # call-seq:
96- # -int -> integer
96+ # -self -> integer
97+ #
98+ # Returns +self+, negated:
99+ #
100+ # -1 # => -1
101+ # -(-1) # => 1
102+ # -0 # => 0
97103 #
98- # Returns +self+, negated.
99104 def -@
100105 Primitive . attr! :leaf
101106 Primitive . cexpr! 'rb_int_uminus(self)'
@@ -373,9 +378,13 @@ def abs
373378 alias magnitude abs
374379
375380 # call-seq:
376- # -float -> float
381+ # -self -> float
382+ #
383+ # Returns +self+, negated:
377384 #
378- # Returns +self+, negated.
385+ # -3.14 # => -3.14
386+ # -(-3.14) # => 3.14
387+ # -0.0 # => -0.0
379388 #
380389 def -@
381390 Primitive . attr! :leaf
Original file line number Diff line number Diff line change @@ -609,9 +609,13 @@ nurat_denominator(VALUE self)
609609
610610/*
611611 * call-seq:
612- * -rat -> rational
612+ * -self -> rational
613+ *
614+ * Returns +self+, negated:
615+ *
616+ * -(1/3r) # => (-1/3)
617+ * -(-1/3r) # => (1/3)
613618 *
614- * Negates +rat+.
615619 */
616620VALUE
617621rb_rational_uminus (VALUE self )
You can’t perform that action at this time.
0 commit comments