From 845c02fb5d072b29d037393e70518d93dcf79398 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 6 Dec 2023 12:38:32 +0900 Subject: [PATCH] [DOC] Add missing documents --- ext/bigdecimal/bigdecimal.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index cf6e7ade..15fe41c2 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -1780,6 +1780,17 @@ BigDecimal_neg(VALUE self) return VpCheckGetValue(c); } +/* + * call-seq: + * a * b -> bigdecimal + * + * Multiply by the specified value. + * + * The result precision will be the precision of the sum of each precision. + * + * See BigDecimal#mult. + */ + static VALUE BigDecimal_mult(VALUE self, VALUE r) { @@ -3257,10 +3268,11 @@ BigDecimal_initialize_copy(VALUE self, VALUE other) return self; } +/* :nodoc: */ static VALUE BigDecimal_clone(VALUE self) { - return self; + return self; } #ifdef HAVE_RB_OPTS_EXCEPTION_P @@ -3758,6 +3770,12 @@ f_BigDecimal(int argc, VALUE *argv, VALUE self) return rb_convert_to_BigDecimal(val, digs, exception); } +/* call-seq: + * BigDecimal.interpret_loosely(string) -> bigdecimal + * + * Returns the +BigDecimal+ converted loosely from +string+. + */ + static VALUE BigDecimal_s_interpret_loosely(VALUE klass, VALUE str) {