From eb5de217f190c70da870931a027b8b989171cc0d Mon Sep 17 00:00:00 2001 From: shyouhei Date: Fri, 13 May 2011 10:27:10 +0000 Subject: Add #flo_coerce documentation. Signed-off-by: URABE, Shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 aNumeric and flt represented + * as Float objects. + * This is achieved by converting aNumeric to a Float. + * + * 1.2.coerce(3) #=> [3.0, 1.2] + * 2.5.coerce(1.1) #=> [1.1, 2.5] */ static VALUE -- cgit v1.2.3