summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2021-03-24Use `div_flo` (copy of `mrb_num_div_flo`) for float division.Yukihiro "Matz" Matsumoto
2021-03-24Use `mrb_num_div_flo` for float division.Yukihiro "Matz" Matsumoto
This function handles zero division properly. Also fixed bugs that multiply numbers instead of division.
2021-03-24Fix infinite recursive call bugs in integer division.Yukihiro "Matz" Matsumoto
2021-03-24complex.c: implement `Complex#/` and `#quo` in C.Yukihiro "Matz" Matsumoto
2021-03-24complex.c: implement `Complex#*` in C.Yukihiro "Matz" Matsumoto
2021-03-24rational.rb: avoid 'NaNi` representation.Yukihiro "Matz" Matsumoto
Use `NaN*i` as CRuby does.
2021-03-23Add `timeout-minutes' to GitHub workflow. [ci skip]Yukihiro "Matz" Matsumoto
2021-03-22Merge pull request #5387 from shuujii/use-global-defines-for-mruby-bin-debuggerYukihiro "Matz" Matsumoto
Use global defines for `mruby-bin-debugger`
2021-03-22Merge pull request #5388 from ↵Yukihiro "Matz" Matsumoto
shuujii/reorganize-types-for-ObjectSpace.count_objects Reorganize types for `ObjectSpace.count_objects`
2021-03-22nintendo_switch.rb: remove trailing white spaces; #5386Yukihiro "Matz" Matsumoto
2021-03-22Reorganize types for `ObjectSpace.count_objects`KOBAYASHI Shuji
#### Addition - T_COMPLEX - T_RATIONAL #### Deletion - T_FALSE - T_FREE - T_TRUE - T_SYMBOL - T_UNDEF
2021-03-22Merge pull request #5386 from LanzaSchneider/masterYukihiro "Matz" Matsumoto
Add example for cross-compiling to Nintendo Switch
2021-03-22Merge pull request #5385 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-configuration-for-MinGW-cross-compilation Add configuration for MinGW cross compilation [ci skip]
2021-03-22Use global defines for `mruby-bin-debugger`KOBAYASHI Shuji
2021-03-22Use global defines for `Rational` and `Complex`.Yukihiro "Matz" Matsumoto
2021-03-22build: provide global defines by `build.defines`.Yukihiro "Matz" Matsumoto
2021-03-22codegen.c: fix integer size warnings.Yukihiro "Matz" Matsumoto
along with repeated calls of `strlen()`.
2021-03-21Add example for cross-compiling to Nintendo SwitchLanza
Cross Compiling configuration for the Nintendo Switch, it requires Nintendo SDK
2021-03-21Add configuration for MinGW cross compilation [ci skip]KOBAYASHI Shuji
With this cross compiler configuration, all tests for full-core gembox on Windows on GitHub Actions were successful.
2021-03-21command.rb: replace `%w()` to plain `[]`.Yukihiro "Matz" Matsumoto
2021-03-21complex.c: define `Complex#==` in C.Yukihiro "Matz" Matsumoto
This change also fixes the error caused by `rational.c` that calls `mrb_complex_eq()`, which had been undefined.
2021-03-21memsize.c: handle `MRB_TT_RATIONAL` and `MRB_TT_COMPLEX`.Yukihiro "Matz" Matsumoto
2021-03-20rational.c: fix `MRB_TT_RATIONAL` and `MRB_TT_COMPLEX` confusion.Yukihiro "Matz" Matsumoto
2021-03-20random.c: fixed seed underflow bug.Yukihiro "Matz" Matsumoto
`MRB_INT_MIN` does not have a corresponding positive value.
2021-03-19complex.c: overhaul complex operators.Yukihiro "Matz" Matsumoto
- define `MRB_TT_COMPLEX` - change object structure (`struct RComplex`) - add memory management for `MRB_TT_COMPLEX` - avoid operator overloading as much as possible - as a result, performance improved a log - should work with and without `Rational` defined
2021-03-19rational.c: overhaul rational operators.Yukihiro "Matz" Matsumoto
- define `MRB_TT_RATIONAL` - change object structure (`struct RRational`) - add memory management for `MRB_TT_RATIONAL` - avoid operator overloading as much as possible - implement division overloading in C - as a result, performance improved a lot
2021-03-19numeric.c: avoid integer overflow; close #5384Yukihiro "Matz" Matsumoto
Since `mruby` does not have `Bignum`, `Float#divmod` could overflow, so it will return `Float` values when the divided value does not fit in `mrb_int`. This behavior will be changed when `Bignum` is introduced to `mruby` in the future.
2021-03-19`Float#divmod` with zero should cause `ZeroDivisionError`; #5384Yukihiro "Matz" Matsumoto
2021-03-18Merge branch 'dearblue-break-in-conf'Yukihiro "Matz" Matsumoto
2021-03-18lib/mruby/build.rb: refactoring `ensure` clause; ref #5381Yukihiro "Matz" Matsumoto
2021-03-18Merge branch 'break-in-conf' of https://github.com/dearblue/mruby into ↵Yukihiro "Matz" Matsumoto
dearblue-break-in-conf
2021-03-18Merge pull request #5383 from shuujii/floatNAN-0-should-be-FloatNANYukihiro "Matz" Matsumoto
`Float::NAN/0` should be `Float::NAN`; ref a0b3378b3
2021-03-18`Float::NAN/0` should be `Float::NAN`; ref a0b3378b3KOBAYASHI Shuji
#### Before this patch: ```console $ bin/mruby -e 'p(Float::NAN/0)' Infinity ``` #### After this patch (same as Ruby): ```console $ bin/mruby -e 'p(Float::NAN/0)' NaN ```
2021-03-18numeric.c: float zero division should be infinity with sign kept; fix #5382Yukihiro "Matz" Matsumoto
2021-03-17Allow `break` in `build_config`.dearblue
If I break out of a block given to `MRuby::Build.new` with `break` or `throw`, I will get a seemingly inexplicable error because the `presym`-related initialization is not done. ```console % cat build_config1.rb MRuby::Build.new do toolchain break end % rake CONFIG=build_config1.rb rake aborted! external mrbc or mruby-bin-mrbc gem in current('host') or 'host' build is required /var/tmp/mruby/lib/mruby/build.rb:332:in `mrbcfile' /var/tmp/mruby/tasks/mrblib.rake:9:in `block in <top (required)>' /var/tmp/mruby/lib/mruby/build.rb:18:in `instance_eval' /var/tmp/mruby/lib/mruby/build.rb:18:in `block in each_target' /var/tmp/mruby/lib/mruby/build.rb:17:in `each' /var/tmp/mruby/lib/mruby/build.rb:17:in `each_target' /var/tmp/mruby/tasks/mrblib.rake:1:in `<top (required)>' /var/tmp/mruby/Rakefile:27:in `load' /var/tmp/mruby/Rakefile:27:in `<top (required)>' (See full trace by running task with --trace) ``` If a non-exceptional global jump occurs, it can be initialized by `ensure` to solve this problem.
2021-03-17hash.c: `Hash#shift` to return `nil` when a hash is empty.Yukihiro "Matz" Matsumoto
It used to be return the default value if available, but it should ignore the default value for behavior consistency. CRuby will adopt this behavior too in the future. [ruby-bugs:16908]
2021-03-17range.c: fixed a begin-less ranges issue.Yukihiro "Matz" Matsumoto
2021-03-16AUTHORS: add the commit hash as of we counted.Yukihiro "Matz" Matsumoto
2021-03-15Merge pull request #5379 from shuujii/fix-typo-in-AUTHORSYukihiro "Matz" Matsumoto
Fix typo in `AUTHORS` [ci skip]
2021-03-15Fix typo in `AUTHORS` [ci skip]KOBAYASHI Shuji
2021-03-15AUTHOR: fixed typos.Yukihiro "Matz" Matsumoto
2021-03-15AUTHORS: add 2 new GitHub accounts.Yukihiro "Matz" Matsumoto
2021-03-15AUTHORS: re-renamed from `AUTHOR.md`.Yukihiro "Matz" Matsumoto
2021-03-15AUTHORS.md: add GitHub accounts if available.Yukihiro "Matz" Matsumoto
2021-03-14Remove mail addresses from `AUTHORS.md`.Yukihiro "Matz" Matsumoto
2021-03-14time.c: calendar clock should use `CLOCK_REALTIME`; 5e95f11Yukihiro "Matz" Matsumoto
The issue was reported by @shuujii
2021-03-13codegen.c: fix memory leak from `new_litbn()`.Yukihiro "Matz" Matsumoto
2021-03-12codegen.c: need to preserve `neg` info.Yukihiro "Matz" Matsumoto
2021-03-12codegen.c: fixed a typo.Yukihiro "Matz" Matsumoto
2021-03-12codegen.c: avoid integer comparison of different sign.Yukihiro "Matz" Matsumoto