diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-03 12:56:34 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-03 13:00:10 +0900 |
| commit | 23e7cb41e5b4b023edfa2a018545b8f09069533c (patch) | |
| tree | 85c4ea2ebc36e81abd8b07e007da616f11cb8258 /src/numeric.c | |
| parent | 019b006ee52fd0bd7786b0f42646e21e5f369e40 (diff) | |
| download | mruby-23e7cb41e5b4b023edfa2a018545b8f09069533c.tar.gz mruby-23e7cb41e5b4b023edfa2a018545b8f09069533c.zip | |
Replace `fixnum` references with `int`.
The `Fixnum` class is no longer provided by `mruby`.
Diffstat (limited to 'src/numeric.c')
| -rw-r--r-- | src/numeric.c | 43 |
1 files changed, 21 insertions, 22 deletions
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 <code>numeric</code> 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 <code>fix</code> modulo <code>other</code>. + * Returns <code>int</code> modulo <code>other</code>. * See <code>numeric.divmod</code> 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 <code>Numeric#divmod</code>. */ @@ -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 <code>true</code> if <code>fix</code> equals <code>other</code> + * Return <code>true</code> if <code>int</code> equals <code>other</code> * 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 <i>fix</i> to a <code>Float</code>. + * Converts <i>int</i> to a <code>Float</code>. * */ @@ -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 <code>numeric</code> 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 <code>numeric</code> 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 <i>fix</i> radix + * Returns a string containing the representation of <i>int</i> radix * <i>base</i> (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 <i>fix</i> is + * Comparison---Returns -1, 0, or +1 depending on whether <i>int</i> is * less than, equal to, or greater than <i>numeric</i>. This is the * basis for the tests in <code>Comparable</code>. When the operands are * not comparable, it returns nil instead of raising an exception. |
