| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2021-01-21 | Merge branch 'avoid-including-presym.inc-in-existing-header-files' of ↵ | Yukihiro "Matz" Matsumoto | |
| https://github.com/shuujii/mruby into shuujii-avoid-including-presym.inc-in-existing-header-files | |||
| 2021-01-17 | Fix `int_quo` to do float division; fix #5268 | Yukihiro "Matz" Matsumoto | |
| 2021-01-17 | Make `mrb_to_flo()` to convert objects, not integer, not float; #5268 | Yukihiro "Matz" Matsumoto | |
| Thinking `Ratinal` and `Complex` in mind. | |||
| 2021-01-11 | Avoid including `presym.inc` in existing header files | KOBAYASHI Shuji | |
| Addressed an issue where existing programs linking `libmruby.a` could only be built by adding `<build-dir>/include` to compiler's include path. | |||
| 2020-12-24 | Check integer overflow in float bit operations. | Yukihiro "Matz" Matsumoto | |
| 2020-12-15 | refactor: remove trailing whitespace from C, Header, Ruby and YAML files | John Bampton | |
| Lint | |||
| 2020-11-24 | Fix compiler errors from `MRB_NO_FLOAT`; #5185 | Yukihiro "Matz" Matsumoto | |
| Also added `no-float.rb` target in `build_config`. | |||
| 2020-11-21 | Update `Float#to_s` to keep trailing zero as CRuby does; ref 68cebb6 | Yukihiro "Matz" Matsumoto | |
| 2020-11-17 | Detect overflow in `flo_shift()`. | Yukihiro "Matz" Matsumoto | |
| 2020-11-17 | Refactor integer division. | Yukihiro "Matz" Matsumoto | |
| 2020-11-17 | Simplify `mrb_num_div_int()`. | Yukihiro "Matz" Matsumoto | |
| 2020-11-14 | Integer operation should result in Integer. | Yukihiro "Matz" Matsumoto | |
| Should raise `RangeError` if the operation overflows. | |||
| 2020-11-09 | Add range check before casting float to integer. | Yukihiro "Matz" Matsumoto | |
| 2020-11-06 | Skip too big left shift in `flo_shift()`. | Yukihiro "Matz" Matsumoto | |
| 2020-11-06 | Avoid negating `MRB_INT_MIN` which is impossible. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Extract `div` code in VM and make them shared by `div` methods. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Remove obsolete `MRB_WITHOUT_FLOAT` macro from `numeric.c`. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Stop warning on 64 bit platforms. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Handle potential overflow in `int_div` and `flo_idiv`. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Use `mrb_int_value()` instead of `mrb_fixnum_value()`. | Yukihiro "Matz" Matsumoto | |
| Where fixnum overflow can happen. | |||
| 2020-10-12 | Reorganize `Integer` system. | Yukihiro "Matz" Matsumoto | |
| - Integrate `Fixnum` and `Integer` - Remove `Integral` - `int / int -> int` - Replace `mrb_fixnum()` to `mrb_int()` - Replace `mrb_fixnum_value()` to `mrb_int_value()`. - Use `mrb_integer_p()` instead of `mrb_fixnum_p()` | |||
| 2020-10-12 | Make division by zero cause `ZeroDivisionError`. | Yukihiro "Matz" Matsumoto | |
| As described in ISO 15.2.30. | |||
| 2020-10-12 | Rename `MRB_TT_FIXNUM` to `MRB_TT_INTEGER`. | Yukihiro "Matz" Matsumoto | |
| We still have `#define MRB_TT_FIXNUM MRB_TT_INTEGER` for compatibility. | |||
| 2020-10-12 | Always add trailing `.0` in `Float#inspect`; ref #4225 | KOBAYASHI Shuji | |
| Trailing `.0` is removed from `Float#to_s` and `Float#inspect` at 9d08025b. However, I think the more human-readable format is better for `Float#inspect`. For example, in the `Float#to_s` format, the failure message is not well understood when testing values including types by `eql?` (e.g. `Numeric#step` test). ```ruby assert "example" do exp = 1.0 act = 1 assert_operator(exp, :eql?, act) #=> Expected 1 to be eql? 1. end ``` | |||
| 2020-10-12 | Integrate `Fixnum` class into `Integer` class | dearblue | |
| * The `Fixnum` constant is now an alias for the `Integer` class. * Remove `struct mrb_state::fixnum_class` member. If necessary, use `struct mrb_state::integer_class` instead. | |||
| 2020-10-12 | Rename float configuration option names. | Yukihiro "Matz" Matsumoto | |
| - `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT` - `MRB_USE_FLOAT` => `MRB_USE_FLOAT32` The former is to use `USE_XXX` naming convention. The latter is to make sure `float` is 32bit float and not floating point number in general. | |||
| 2020-10-12 | Use functions that take symbols to reduce string litrals in C. | Yukihiro "Matz" Matsumoto | |
| 2020-10-12 | Use `mrb_funcall_id()` extensively. | Yukihiro "Matz" Matsumoto | |
| Except for support files e.g. `mruby-test/driver.c`, which are not target of symbol collection via `rake gensym`. | |||
| 2020-10-12 | Fix argument error when built with MRB_WITHOUT_FLOAT flag | ssmallkirby | |
| Fixed inproper argument of mrb_fixnum_value() called in integral_div(), when built with MRB_WITHOUT_FLOAT flag. Co-authored-by: taiyoslime <[email protected]> Co-authored-by: n4o847 <[email protected]> | |||
| 2020-08-08 | Return `NaN` for `0/0`; d8e060d | Yukihiro "Matz" Matsumoto | |
| 2020-08-08 | Should not use `mrb_float_value()` with `MRB_WITHOUT_FLOAT`. | Yukihiro "Matz" Matsumoto | |
| 2020-08-07 | Avoid `division by zero` undefined behavior. | Yukihiro "Matz" Matsumoto | |
| 2020-06-25 | Remove unnecessary `break` from `numeric.c`. | Yukihiro "Matz" Matsumoto | |
| 2020-06-20 | Add `mrb_get_arg1()` that retrieves single (and only) argument. | Yukihiro "Matz" Matsumoto | |
| `mrb_get_arg1()` raises `ArgumentError` if the method does not receive one argument. And replaces all `mrb_get_args(mrb, "o", &arg)` by the new function. | |||
| 2020-06-03 | Merge pull request #4800 from ↵ | Yukihiro "Matz" Matsumoto | |
| shuujii/set-MRB_STR_ASCII-flag-to-some-stringize-methods Set `MRB_STR_ASCII` flag to some stringize methods | |||
| 2020-05-07 | Update `cmpnum` document. | Yukihiro "Matz" Matsumoto | |
| `cmpnum` function may return `nil` on error. | |||
| 2019-11-11 | Fix argument specs to `Integer` | KOBAYASHI Shuji | |
| 2019-10-31 | Set `MRB_STR_ASCII` flag to some stringize methods | KOBAYASHI Shuji | |
| - `Fixnum#to_s`, `Fixnum#inspect` - `Float#to_s`, `Float#inspect` - `NilClass#to_s`, `NilClass#inspect` - `FalseClass#to_s`, `FalseClass#inspect` - `TrueClass#to_s`, `TrueClass#inspect` - `Time#to_s`, `Time#inspect` | |||
| 2019-09-26 | Use type predicate macros instead of `mrb_type` if possible | KOBAYASHI Shuji | |
| For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`). | |||
| 2019-09-18 | Remove `mrb_get_args(mrb, "")`; ref 30f37872 | KOBAYASHI Shuji | |
| 2019-09-17 | Fix `Fixnum#(to_s|inspect)` argument specs | KOBAYASHI Shuji | |
| Before this patch: $ bin/mruby -e 'p 3.to_s(2)' trace (most recent call last): [0] -e:1 -e:1: 'to_s': wrong number of arguments (1 for 0) (ArgumentError) After this patch: $ bin/mruby -e 'p 3.to_s(2)' "11" | |||
| 2019-09-14 | Remove `mrb_funcall` from `<=>` operations. | Yukihiro "Matz" Matsumoto | |
| 2019-09-07 | Revert part of #4225 | Yukihiro "Matz" Matsumoto | |
| Since in mruby, Integer and Float interchange frequently (mostly on overflow), so adding explicit `.0` can cause problems sometimes. For example: https://github.com/mattn/mruby-json/pull/40 https://github.com/pepabo/mruby-msd/pull/13 https://github.com/mattn/mruby-json/pull/42 | |||
| 2019-08-06 | Add `mrb_noreturn` to `cmperr()` in `src/numeric.c` | KOBAYASHI Shuji | |
| 2019-08-05 | Use new specifiers/modifiers of `mrb_vfromat()` | KOBAYASHI Shuji | |
| The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back. | |||
| 2019-07-31 | Avoid `MRB_INT_MIN` to apply `fixdivmod`. | Yukihiro "Matz" Matsumoto | |
| `MRB_INT_MIN` is the only integer value that has no corresponding positive integer value (i.e. `-MRB_INT_MIN` = `MRB_INT_MIN`). | |||
| 2019-07-31 | Normalize floating point negative zero to positive zero in `flodivmod'. | Yukihiro "Matz" Matsumoto | |
| 2019-07-31 | Should return +/- infinity for float division by zero. | Yukihiro "Matz" Matsumoto | |
| 2019-07-31 | Use `NULL` instead of `0` for null pointers. | Yukihiro "Matz" Matsumoto | |
| 2019-07-30 | Fixed integer overflow in `lshift`. | Yukihiro "Matz" Matsumoto | |
