numeric.c: update documents [ci skip].
MODIFY
src/numeric.c
src/numeric.c
@@ -140,11 +140,10 @@ mrb_div_int_value(mrb_state *mrb, mrb_int x, mrb_int y)
return mrb_int_value(mrb, mrb_div_int(x, y));
}
-/* 15.2.8.3.4 */
-/* 15.2.9.3.4 */
+/* 15.2.8.3.6 */
/*
* call-seq:
- * int / other -> num
+ * int / num -> num
*
* Performs division: the class of the resulting object depends on
* the class of <code>num</code> and on the magnitude of the
@@ -314,6 +313,13 @@ mrb_div_float(mrb_float x, mrb_float y)
}
}
+/* 15.2.9.3.6 */
+/*
+ * call-seq:
+ * float / num -> float
+ *
+ * Returns a new Float which is the result of dividing float by num.
+ */
static mrb_value
flo_div(mrb_state *mrb, mrb_value x)
{
@@ -396,7 +402,7 @@ flo_to_s(mrb_state *mrb, mrb_value flt)
return str;
}
-/* 15.2.9.3.1 */
+/* 15.2.9.3.3 */
/*
* call-seq:
* float + other -> float
@@ -422,7 +428,7 @@ flo_add(mrb_state *mrb, mrb_value x)
}
}
-/* 15.2.9.3.2 */
+/* 15.2.9.3.4 */
/*
* call-seq:
* float - other -> float
@@ -449,7 +455,7 @@ flo_sub(mrb_state *mrb, mrb_value x)
}
}
-/* 15.2.9.3.3 */
+/* 15.2.9.3.5 */
/*
* call-seq:
* float * other -> float
@@ -1102,7 +1108,7 @@ flo_abs(mrb_state *mrb, mrb_value num)
*
*/
-
+/* 15.2.9.3.24 */
/*
* call-seq:
* int.to_i -> integer
@@ -1169,7 +1175,7 @@ mrb_int_mul(mrb_state *mrb, mrb_value x, mrb_value y)
}
}
-/* 15.2.8.3.3 */
+/* 15.2.8.3.5 */
/*
* call-seq:
* int * numeric -> numeric_result
@@ -1214,10 +1220,10 @@ intdivmod(mrb_state *mrb, mrb_int x, mrb_int y, mrb_int *divp, mrb_int *modp)
}
}
-/* 15.2.8.3.5 */
+/* 15.2.8.3.7 */
/*
* call-seq:
- * int % other -> real
+ * int % num -> num
*
* Returns <code>int</code> modulo <code>other</code>.
* See <code>numeric.divmod</code> for more information.
@@ -1313,7 +1319,7 @@ flo_divmod(mrb_state *mrb, mrb_value x)
}
#endif
-/* 15.2.8.3.7 */
+/* 15.2.8.3.2 */
/*
* call-seq:
* int == other -> true or false
@@ -1812,7 +1818,7 @@ mrb_int_add(mrb_state *mrb, mrb_value x, mrb_value y)
}
}
-/* 15.2.8.3.1 */
+/* 15.2.8.3.3 */
/*
* call-seq:
* int + numeric -> numeric_result
@@ -1876,11 +1882,10 @@ mrb_int_sub(mrb_state *mrb, mrb_value x, mrb_value y)
}
}
-/* 15.2.8.3.2 */
-/* 15.2.8.3.16 */
+/* 15.2.8.3.4 */
/*
* call-seq:
- * int - numeric -> numeric_result
+ * int - numeric -> numeric
*
* Performs subtraction: the class of the resulting object depends on
* the class of <code>numeric</code> and on the magnitude of the
@@ -2041,7 +2046,8 @@ int_hash(mrb_state *mrb, mrb_value self)
return mrb_int_value(mrb, mrb_byte_hash((uint8_t*)&n, sizeof(n)));
}
-/* 15.2.9.3.6 */
+/* 15.2.8.3.1 */
+/* 15.2.9.3.1 */
/*
* call-seq:
* self.f <=> other.f => -1, 0, +1, or nil

numeric.c: update documents [ci skip].