summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2019-09-14Revert "Update `%pure-parser` to `%define api.pure` for newer `bison`; fix ↵Yukihiro "Matz" Matsumoto
#4706" The `bison` on MacOS does not support `%define api.pure`. This reverts commit f7c9f1f796d83b9316917681ea068ff648248425.
2019-09-14Update `%pure-parser` to `%define api.pure` for newer `bison`; fix #4706Yukihiro "Matz" Matsumoto
2019-09-14Remove `mrb_funcall` from `<=>` operations.Yukihiro "Matz" Matsumoto
2019-09-14Replace `loop` method with `while true` loop to gain performance.Yukihiro "Matz" Matsumoto
2019-09-13Update `assert_take` for zero size take.Yukihiro "Matz" Matsumoto
2019-09-13Add `Enumerator.produce` from Ruby2.7Yukihiro "Matz" Matsumoto
2019-09-13Remove unnecessary files from `mruby-{io,pack,socket}`.Yukihiro "Matz" Matsumoto
2019-09-12Remove `$/` from mruby implementation.Yukihiro "Matz" Matsumoto
1. `$/` and other Perl-ish global variables are not defined in ISO. 2. The current Ruby policy do not encourage those variables. 3. Those variables has global effect and can cause troubles.
2019-09-12Removed unnecessary files from `mruby-sleep`; #4702Yukihiro "Matz" Matsumoto
2019-09-11Remove `Rakefile` from `mruby-sleep` gem; fix #4702Yukihiro "Matz" Matsumoto
The `Rakefile` was a leftover from the time it was an independent gem.
2019-09-11Move tests related to `getbyte`, `setbyte`, byteslice` to core.Yukihiro "Matz" Matsumoto
2019-09-11Fixed `length` for IO should be in bytes, not in characters; #4696Yukihiro "Matz" Matsumoto
E.g. `io.read(5)` should read 5 byte string, not 5 characters.
2019-09-11Move `String#{getbyte,setbyte,byteslice}` to the core; #4696Yukihiro "Matz" Matsumoto
Unlike CRuby, there's no way to process strings byte-wise by core methods because there's no per string encoding in mruby, so that we moved 3 byte-wise operation methods from `mruby-string-ext` gem.
2019-09-11Drop test dependency from `mruby-string-ext` to `mruby-enumerator`KOBAYASHI Shuji
2019-09-09change _ variable in mirb to be enable by defaulttakkaw
2019-09-09add special local variable _ in mirbtakkaw
2019-09-05Fix `Range#max` test (`TypeError` is raised) on 32-bit mode with word boxingKOBAYASHI Shuji
2019-09-02Merge pull request #4683 from ↵Yukihiro "Matz" Matsumoto
shuujii/enumeratorChain-rewind-shouldnt-rewind-elements-arent-iterated `Enumerator::Chain#rewind` shouldn't rewind elements aren't iterated
2019-09-02`Enumerator::Chain#rewind` shouldn't rewind elements aren't iteratedKOBAYASHI Shuji
### Example: ```ruby # example.rb e = [1] def e.rewind; p :r end c = e.chain(e) c.each{break c}.rewind ``` #### Before this patch: ```terminal $ bin/mruby example.rb :r :r ``` #### After this patch (same as Ruby): ```terminal $ bin/mruby example.rb :r ```
2019-09-02Small refactoring in `fiber.c`.Yukihiro "Matz" Matsumoto
2019-09-01Merge pull request #4681 from ↵Yukihiro "Matz" Matsumoto
shuujii/array-permutation-with-a-negative-argument-should-not-yield `Array#permutation` with a negative argument should not yield
2019-09-01`Array#permutation` with a negative argument should not yieldKOBAYASHI Shuji
Before this patch: $ bin/mruby -e '[1].permutation(-1){|v| p v}' #=> [1] After this patch (same as Ruby): $ bin/mruby -e '[1].permutation(-1){|v| p v}' #=> no output
2019-08-31Skip `nil?` method call in `if` conditionals.Yukihiro "Matz" Matsumoto
Compile `if expr.nil?` to use `OP_JMPNIL` instead of calls.
2019-08-30`Array#(permutation|combination)` without block should return `self`KOBAYASHI Shuji
2019-08-27Fix build of `mruby-random` on 32-bit modeKOBAYASHI Shuji
2019-08-26Fix `Array#sample` with `MRB_INT32`KOBAYASHI Shuji
Array index became potentially negative because `uint32_t` is cast to `mrb_int`.
2019-08-26Merge pull request #4635 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-wrong-argument-for-fprintf-in-mruby-bin-mrbc Fix wrong argument for `fprintf` in `mruby-bin-mrbc`
2019-08-26Remove unused `random.h`KOBAYASHI Shuji
2019-08-25Merge pull request #4667 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-Range-max-test-TypeError-is-raised-on-32-bit-mode Fix `Range#max` test (`TypeError` is raised) on 32-bit mode
2019-08-24Fix `Range#max` test (`TypeError` is raised) on 32-bit modeKOBAYASHI Shuji
2019-08-24Create a symbolic link in the temporary directory; fix #4642dearblue
Because the linker gives a warning on FreeBSD 12.0. ``` warning: mktemp() possibly used unsafely; consider using mkstemp() ```
2019-08-21Merge pull request #4650 from take-cheeze/patch-5Yukihiro "Matz" Matsumoto
Remove deprecated iij stuffs
2019-08-20Remove deprecated iij stuffsTakeshi Watanabe
2019-08-20Fix link of mruby-ioTakeshi Watanabe
2019-08-20Fixed a bug in the `OP_JMPNOT` optimization (13eaff4); fix #4644Yukihiro "Matz" Matsumoto
2019-08-19Merge pull request #4639 from dearblue/suppress-Wstringop-truncationYukihiro "Matz" Matsumoto
Suppress warnings for `strncat()`
2019-08-19Merge pull request #4638 from dearblue/simplify-get-argsYukihiro "Matz" Matsumoto
Simplify get arguments
2019-08-19Merge pull request #4642 from dearblue/unique-symlinkYukihiro "Matz" Matsumoto
Make symbolic link names unique for test
2019-08-18Make symbolic link names unique for testdearblue
2019-08-18Suppress warnings for `strncat()`dearblue
`strncat()` also needs `'\0'`.
2019-08-18Simplify get argumentsdearblue
- `mrb_str_index_m()` and `mrb_str_rindex()` Make `mrb_get_args()` called only once from called twice. - `mrb_str_byteslice()` Replace `goto` with `if ~ else`.
2019-08-18Prohibit changes to iseq in principledearblue
2019-08-17Fix wrong argument for `fprintf` in `mruby-bin-mrbc`KOBAYASHI Shuji
2019-08-17Remove unnecessary `OP_JMPNOT` for `unless` statement.Yukihiro "Matz" Matsumoto
2019-08-16Avoid creating unnecessary empty arrays on splat.Yukihiro "Matz" Matsumoto
But this changes requires `OP_ARYCAT` and `OP_ARYPUSH` to accept `nil` as their first operand. Alternative VMs (e.g. `mruby/c`) that understand mruby bytecode need to be updated.
2019-08-12Remove unnecessary prototypes from 'keywords`; fix #4628Yukihiro "Matz" Matsumoto
2019-08-09Avoid overflow and underflow in Complex#/Ray Chason
2019-08-08Implement Complex#abs in terms of Math.hypotRay Chason
Math.hypot avoids premature overflow and underflow
2019-08-07Reorganize `mrb_string_value_cstr` and related functions.Yukihiro "Matz" Matsumoto
`mrb_string_value_cstr` and `mrb_string_value_len`: obsolete `mrb_string_cstr`: new function to retrieve NULL terminated C string `RSTRING_CSTR`: wrapper macro of `mrb_string_cstr`
2019-08-07`RUBY_PLATFORM` may not contain `mswin` or `mingw`; Add `msys`Yukihiro "Matz" Matsumoto