summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2021-01-24Define `RAT_INT_LIMIT` for 32 bit platforms.Yukihiro "Matz" Matsumoto
2021-01-24Prohibit `r` suffix after scientific notation (e.g. `1e10`).Yukihiro "Matz" Matsumoto
As CRuby does.
2021-01-24Detect integer overflow in `rational_new_f()`.Yukihiro "Matz" Matsumoto
2021-01-22Minimize the changes in #5277Yukihiro "Matz" Matsumoto
Instead of including `mruby/presym.h` everywhere, we provided the fallback `mruby/presym.inc` under `include/mruby` directory, and specify `-I<build-dir>/include` before `-I<top-dir>/include` in `presym.rake`. So even when someone drops `-I<build-dir>/include` in compiler options, it just compiles without failure.
2021-01-21Merge 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-21Fix a bug that `:_1` to cause syntax error; fix #5295Yukihiro "Matz" Matsumoto
2021-01-21Better error messages with yacc tokens.Yukihiro "Matz" Matsumoto
2021-01-21Silence gcc warning from `strncpy()`.Yukihiro "Matz" Matsumoto
2021-01-18Fix build error for mruby-bin-debuggerdearblue
This is a missing change in #5272. This issue was reported by @shuujii. https://github.com/mruby/mruby/pull/5272#issuecomment-761819737
2021-01-17Define `Rational#quo`; fix #5268Yukihiro "Matz" Matsumoto
2021-01-16Fix NULL pointer dereference with mruby-os-memsize and mruby-methoddearblue
If it gets an insubstantial method object with `obj.method`, it will raise a `SIGSEGV` with `ObjectSpace.memsize_of(method)`.
2021-01-15Avoid syntax error regarding colons in the expression; fix #5290Yukihiro "Matz" Matsumoto
Reported and inspired by @hasumikin; based on CRuby's `parse.y`.
2021-01-14Merge pull request #5273 from dearblue/fiberYukihiro "Matz" Matsumoto
Capture the return value of `Fiber.yield` via C; ref #5261
2021-01-13Rational denominator should not be zero.Yukihiro "Matz" Matsumoto
2021-01-12Capture the return value of `Fiber.yield` via C; ref #5261dearblue
2021-01-12Merge pull request #5289 from dearblue/sockaddr_unYukihiro "Matz" Matsumoto
Initialize all area of `struct sockaddr_un`
2021-01-12Initialize all area of `struct sockaddr_un`dearblue
Members of `struct sockaddr_un` are requesting the definitions of `sun_family` and `sun_path`. https://pubs.opengroup.org/onlinepubs/009696699/basedefs/sys/un.h.html But the other members are optional and environment dependent. In fact, other members are defined in the BSD series. from NetBSD-9.1 <https://github.com/NetBSD/src/blob/da504f75982b244b2288bc9970bbc203bd77a9c1/sys/sys/un.h#L49-L53> ```c struct sockaddr_un { unsigned char sun_len; /* sockaddr len excluding NUL */ sa_family_t sun_family; /* AF_UNIX */ char sun_path[104]; /* path name (gag) */ }; ```
2021-01-12Merge branch 'reorganize-ci' of https://github.com/dearblue/mruby into ↵Yukihiro "Matz" Matsumoto
dearblue-reorganize-ci
2021-01-12Silence Windows warnings (cast and `setmode`).Yukihiro "Matz" Matsumoto
2021-01-12Changed packing format of inline symbols.Yukihiro "Matz" Matsumoto
To make inline symbols packed in 30 bits.
2021-01-11Merge pull request #5285 from dearblue/io-unimpsYukihiro "Matz" Matsumoto
Remove functions for unimplemented methods
2021-01-11Integrate the argument parsing part of `IO.popen`dearblue
2021-01-11Remove functions for unimplemented methodsdearblue
- Use `mrb_notimplement_m()` instead. - Hide the unused `option_to_fd()` when `TARGET_OS_IPHONE` is enabled.
2021-01-11Create a `mruby-config` that can be run on the host by cross-buildingdearblue
The output directory will be `host-bin`, so it will be output as `<build-dir>/host-bin/mruby-config`. It's still not available for target devices.
2021-01-11Avoid including `presym.inc` in existing header filesKOBAYASHI Shuji
Addressed an issue where existing programs linking `libmruby.a` could only be built by adding `<build-dir>/include` to compiler's include path.
2021-01-10Fix CI failure on Windows environment.Yukihiro "Matz" Matsumoto
`1L` on Windows means `32 bit int`.
2021-01-10Fix mixture of inline `int` declaration in `for` statement.Yukihiro "Matz" Matsumoto
2021-01-10Revert "Revert "Simplify full-core.gembox""Yukihiro "Matz" Matsumoto
This reverts commit 37d795dec7b495d418dc2f9020cf980c158ba9ed. This reapplies e20d652 (#4202), which is reverted, but its issue was solved by 1d8456f.
2021-01-10Revert "Save&restore execution point (`pc`) in `c->cibase->pc`; fix #5261"dearblue
This reverts commit a0c1e075e35c358d21934c28ff1bec4153502409. This is because the `mrb_callinfo::pc` has been reorganized, resulting in over-correction.
2021-01-10Unified `pc` and `err` of `mrb_callinfo`dearblue
This enhances self-containment. - Changed the `mrb_callinfo::pc` field to point to itself. Previously it indicated the return destination of the previous call level. `mrb_callinfo::pc` will now hold the address to its own `proc->body.irep->iseq`. - Removed `mrb_callinfo::err` field. This is because `mrb_callinfo::pc - 1` is semantically the same as the previous `err`. - The `pc0` and `pc_save` variables in `mrb_vm_exec()` are no longer needed and have been deleted. - It removes the argument because `cipush()` doesn't need to save the previous `pc`.
2021-01-10Changes `stackent` to `stack` of `mrb_callinfo`dearblue
This enhances self-containment. Previously `mrb_context::stack` had the current call level stack, but now it owns it. The `mrb_context::stack` field, which is no longer needed, will be removed.
2021-01-10Unified `target_class` and `env` of `mrb_callinfo`dearblue
If there is `env`, `env->c` means `target_class`.
2021-01-09Fix wrong float to rational conversion in 32 bit mode.Yukihiro "Matz" Matsumoto
2021-01-09Convert float number to rational by decoding mantissa.Yukihiro "Matz" Matsumoto
2021-01-09Remove `khash.h` leftovers.Yukihiro "Matz" Matsumoto
2021-01-08Merge pull request #5267 from shuujii/delay-test-code-build-until-rake-testYukihiro "Matz" Matsumoto
Delay test code build until `rake test`
2021-01-08Save&restore execution point (`pc`) in `c->cibase->pc`; fix #5261Yukihiro "Matz" Matsumoto
`mrb_fiber_resume()` can be called from C; ref #3056
2021-01-08Delay test code build until `rake test`KOBAYASHI Shuji
With this change, the test code will not be built unless `rake test` is run, so there will be almost no side effects even if `enable_test` is always set (but, gems specified by `add_test_dependency` are included in `libmruby.a`). Also added are `test: build` task, which only builds the test code (including the main code), and `test: run` task, which only runs tests independent of build. Therefore, the idiom for building in parallel and not running tests in parallel is `rake -m test:build && rake test:run`.
2021-01-07Use `nint()` for implicit cast; ref #5260Yukihiro "Matz" Matsumoto
2021-01-06Add heredoc_push_indented helper functionSeeker
2021-01-06Fix line continuations with mixed indentation in squiggly heredocsSeeker
2021-01-06Fix build with `enable_cxx_exception`KOBAYASHI Shuji
2021-01-06Specify receivers for `gembox` methods; ref #5241Yukihiro "Matz" Matsumoto
2021-01-06Merge pull request #5241 from dearblue/gemboxYukihiro "Matz" Matsumoto
Take advantage of gembox
2021-01-06Use `~0U` instead of `~0` to avoid sign comparison warnings.Yukihiro "Matz" Matsumoto
2021-01-06Merge branch 'improve-source-scanning-for-presym' of ↵Yukihiro "Matz" Matsumoto
https://github.com/shuujii/mruby into shuujii-improve-source-scanning-for-presym
2021-01-06Avoid comparing `-1` with `size_t` (unsigned); Use `~0` instead.Yukihiro "Matz" Matsumoto
2021-01-06Allow context switch from C using `mrb_fiber_resume()`.Yukihiro "Matz" Matsumoto
But you still cannot cross C function boundary.
2021-01-05Remove duplicated `remove_sign_bits()` call.Yukihiro "Matz" Matsumoto
2021-01-04Fix `mirb` not to be terminated by `codegen error`.Yukihiro "Matz" Matsumoto