summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2021-03-24complex.c: override float division to support `Complex`.Yukihiro "Matz" Matsumoto
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-22Merge pull request #5387 from shuujii/use-global-defines-for-mruby-bin-debuggerYukihiro "Matz" Matsumoto
Use global defines for `mruby-bin-debugger`
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-22Use global defines for `mruby-bin-debugger`KOBAYASHI Shuji
2021-03-22Use global defines for `Rational` and `Complex`.Yukihiro "Matz" Matsumoto
2021-03-22codegen.c: fix integer size warnings.Yukihiro "Matz" Matsumoto
along with repeated calls of `strlen()`.
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-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: avoid integer comparison of different sign.Yukihiro "Matz" Matsumoto
2021-03-12codegen.c: no integer overflow error in `codegen`; close #5376Yukihiro "Matz" Matsumoto
Add new pool value type `IREP_TT_BIGINT` and generate integer overflow error in the VM. In the future, `mruby` will support `Bignum` for integers bigger than `mrb_int` (probably using `mpz`).
2021-03-09chore: fix grammarJohn Bampton
2021-03-08time.c: fix errors on Windows and macOS; ref #5354Yukihiro "Matz" Matsumoto
`gmtime_r` detection logic was too strict.
2021-03-08ISO C99 doesn't support unnamed unions; fix #5354Yukihiro "Matz" Matsumoto
2021-03-03time.c: `timespec_get()` never fails.Yukihiro "Matz" Matsumoto
2021-03-03time.c: fixed wrong condition to include `unistd.h`.Yukihiro "Matz" Matsumoto
2021-03-03time.c: Windows does not have `unistd.h`.Yukihiro "Matz" Matsumoto
2021-03-03time.c: use `clock_gettime()` if possible.Yukihiro "Matz" Matsumoto
2021-03-03time.c: adjust buffer size in `mrb_time_asctime()`.Yukihiro "Matz" Matsumoto
2021-03-03time.c: fix compile errors in `mrb_time_asctime()`.Yukihiro "Matz" Matsumoto
2021-03-02Merge pull request #5368 from jbampton/add-pre-commit-frameworkYukihiro "Matz" Matsumoto
feat: add pre-commit framework
2021-03-01binding-core.c: add cast to remove warnings; ref #5362Yukihiro "Matz" Matsumoto
2021-03-01time.c: fixed a bug on no builtin overflow (e.g. VC).Yukihiro "Matz" Matsumoto
2021-03-01feat: add pre-commit frameworkJohn Bampton
2021-03-01time.c: avoid using `mrb_int_{add,sub}_overflow()`.Yukihiro "Matz" Matsumoto
The size and signedness of `mrb_int` and `time_t` may differ.
2021-02-28Merge pull request #5367 from dearblue/libeditYukihiro "Matz" Matsumoto
Support libedit on mirb for FreeBSD
2021-02-28time.c: check overflow in addition and subtraction of `Time`.Yukihiro "Matz" Matsumoto
2021-02-28Remove periods from error messages according to the convention.Yukihiro "Matz" Matsumoto
2021-02-28time.c: change `RuntimeError` to `ArgumentError`.Yukihiro "Matz" Matsumoto
2021-02-28Support libedit on mirb for FreeBSDdearblue
2021-02-27pack.c: add more checks for `pack_pack()`.Yukihiro "Matz" Matsumoto
2021-02-26Use `MRB_SYM()` more extensively.Yukihiro "Matz" Matsumoto
2021-02-25Merge pull request #5362 from dearblue/bindingYukihiro "Matz" Matsumoto
Binding
2021-02-24parse.y: endless_method_name should allow `==`.Yukihiro "Matz" Matsumoto
e.g. `def ==(v) = true`. The issue is reported by @shuujii
2021-02-24parse.y: upgrade endless `def` syntax.Yukihiro "Matz" Matsumoto
- prohibit defining setter method - allow endless def without parentheses
2021-02-22Added other methods for `Binding`dearblue
- Added to `mruby-binding-core` - `Binding#local_variable_defined?` - `Binding#local_variable_get` - `Binding#local_variable_set` - `Binding#local_variables` - `Binding#receiver` - `Binding#source_location` - `Binding#inspect` - Added to `mruby-proc-binding` - `Proc#binding` The reason for separating `Proc#binding` is that core-mrbgems has a method that returns a closure object to minimize possible problems with being able to manipulate internal variables. By separating it as different mrbgem, each user can judge this problem and incorporate it arbitrarily.
2021-02-22Adjustment of the current HEAD and bindings, and separationdearblue
Make changes to make `Binding` work. At the same time, it separates `Binding#eval`, which depends on `mruby-eval`, from `mruby-binding-core`.
2021-02-22Change `mruby-binding` to `mruby-binding-core`dearblue