summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-13 10:27:10 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-13 10:27:10 +0000
commiteb5de217f190c70da870931a027b8b989171cc0d (patch)
tree5dfb0995be3300f49d4fea1a29b5dd18443fff2e /numeric.c
parent79fdc67835ae7f15f31ef7f8c826ffe1969a5dc9 (diff)
Add #flo_coerce documentation.
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 508360159c..2d7dfd4f7e 100644
--- a/numeric.c
+++ b/numeric.c
@@ -668,7 +668,15 @@ flo_to_s(VALUE flt)
}
/*
- * MISSING: documentation
+ * call-seq:
+ * flt.flo_coerce(numeric) -> array
+ *
+ * Returns an array with both <i>aNumeric</i> and <i>flt</i> represented
+ * as <code>Float</code> objects.
+ * This is achieved by converting <i>aNumeric</i> to a <code>Float</code>.
+ *
+ * 1.2.coerce(3) #=> [3.0, 1.2]
+ * 2.5.coerce(1.1) #=> [1.1, 2.5]
*/
static VALUE