From 23e7cb41e5b4b023edfa2a018545b8f09069533c Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 3 Aug 2021 12:56:34 +0900 Subject: Replace `fixnum` references with `int`. The `Fixnum` class is no longer provided by `mruby`. --- src/numeric.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'src/numeric.c') diff --git a/src/numeric.c b/src/numeric.c index 1bb9f5ea4..d9e807865 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -1064,7 +1064,7 @@ mrb_num_mul(mrb_state *mrb, mrb_value x, mrb_value y) /* 15.2.8.3.3 */ /* * call-seq: - * fix * numeric -> numeric_result + * int * numeric -> numeric_result * * Performs multiplication: the class of the resulting object depends on * the class of numeric and on the magnitude of the @@ -1104,10 +1104,9 @@ intdivmod(mrb_state *mrb, mrb_int x, mrb_int y, mrb_int *divp, mrb_int *modp) /* 15.2.8.3.5 */ /* * call-seq: - * fix % other -> real - * fix.modulo(other) -> real + * int % other -> real * - * Returns fix modulo other. + * Returns int modulo other. * See numeric.divmod for more information. */ @@ -1139,7 +1138,7 @@ int_mod(mrb_state *mrb, mrb_value x) /* * call-seq: - * fix.divmod(numeric) -> array + * int.divmod(numeric) -> array * * See Numeric#divmod. */ @@ -1190,9 +1189,9 @@ flo_divmod(mrb_state *mrb, mrb_value x) /* 15.2.8.3.7 */ /* * call-seq: - * fix == other -> true or false + * int == other -> true or false * - * Return true if fix equals other + * Return true if int equals other * numerically. * * 1 == 2 #=> false @@ -1227,7 +1226,7 @@ int_equal(mrb_state *mrb, mrb_value x) /* 15.2.8.3.8 */ /* * call-seq: - * ~fix -> integer + * ~int -> integer * * One's complement: returns a number where each bit is flipped. * ex.0---00001 (1)-> 1---11110 (-2) @@ -1260,7 +1259,7 @@ static mrb_value flo_xor(mrb_state *mrb, mrb_value x); /* 15.2.8.3.9 */ /* * call-seq: - * fix & integer -> integer_result + * int & integer -> integer_result * * Bitwise AND. */ @@ -1276,7 +1275,7 @@ int_and(mrb_state *mrb, mrb_value x) /* 15.2.8.3.10 */ /* * call-seq: - * fix | integer -> integer_result + * int | integer -> integer_result * * Bitwise OR. */ @@ -1292,7 +1291,7 @@ int_or(mrb_state *mrb, mrb_value x) /* 15.2.8.3.11 */ /* * call-seq: - * fix ^ integer -> integer_result + * int ^ integer -> integer_result * * Bitwise EXCLUSIVE OR. */ @@ -1343,9 +1342,9 @@ mrb_num_shift(mrb_state *mrb, mrb_int val, mrb_int width, mrb_int *num) /* 15.2.8.3.12 */ /* * call-seq: - * fix << count -> integer or float + * int << count -> integer or float * - * Shifts _fix_ left _count_ positions (right if _count_ is negative). + * Shifts _int_ left _count_ positions (right if _count_ is negative). */ static mrb_value @@ -1368,9 +1367,9 @@ int_lshift(mrb_state *mrb, mrb_value x) /* 15.2.8.3.13 */ /* * call-seq: - * fix >> count -> integer or float + * int >> count -> integer or float * - * Shifts _fix_ right _count_ positions (left if _count_ is negative). + * Shifts _int_ right _count_ positions (left if _count_ is negative). */ static mrb_value @@ -1394,9 +1393,9 @@ int_rshift(mrb_state *mrb, mrb_value x) /* 15.2.8.3.23 */ /* * call-seq: - * fix.to_f -> float + * int.to_f -> float * - * Converts fix to a Float. + * Converts int to a Float. * */ @@ -1502,7 +1501,7 @@ mrb_num_plus(mrb_state *mrb, mrb_value x, mrb_value y) /* 15.2.8.3.1 */ /* * call-seq: - * fix + numeric -> numeric_result + * int + numeric -> numeric_result * * Performs addition: the class of the resulting object depends on * the class of numeric and on the magnitude of the @@ -1575,7 +1574,7 @@ mrb_num_minus(mrb_state *mrb, mrb_value x, mrb_value y) /* 15.2.8.3.16 */ /* * call-seq: - * fix - numeric -> numeric_result + * int - numeric -> numeric_result * * Performs subtraction: the class of the resulting object depends on * the class of numeric and on the magnitude of the @@ -1641,9 +1640,9 @@ mrb_integer_to_str(mrb_state *mrb, mrb_value x, mrb_int base) /* 15.2.8.3.25 */ /* * call-seq: - * fix.to_s(base=10) -> string + * int.to_s(base=10) -> string * - * Returns a string containing the representation of fix radix + * Returns a string containing the representation of int radix * base (between 2 and 36). * * 12345.to_s #=> "12345" @@ -1715,7 +1714,7 @@ cmpnum(mrb_state *mrb, mrb_value v1, mrb_value v2) * < => -1 * = => 0 * > => +1 - * Comparison---Returns -1, 0, or +1 depending on whether fix is + * Comparison---Returns -1, 0, or +1 depending on whether int is * less than, equal to, or greater than numeric. This is the * basis for the tests in Comparable. When the operands are * not comparable, it returns nil instead of raising an exception. -- cgit v1.2.3