summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2019-09-16Merge pull request #4255 from shuujii/enumerator-size-is-not-supportedYukihiro "Matz" Matsumoto
`Enumerator#size` is not supported [ci skip]
2019-09-16Implement `Enumerable` tally from Ruby2.7.Yukihiro "Matz" Matsumoto
2019-09-16Implement `filter_map` from Ruby2.6.Yukihiro "Matz" Matsumoto
2019-09-16Add `filter` aliases for `Enumerable` and `Hash`.Yukihiro "Matz" Matsumoto
2019-09-16Add `Array#difference` method from Ruby2.6.Yukihiro "Matz" Matsumoto
2019-09-16Implement `bind_call` method from Ruby2.7.Yukihiro "Matz" Matsumoto
2019-09-16Add small fix over #4712Yukihiro "Matz" Matsumoto
2019-09-16Fix broken UTF-8 characters by `IO#getc`dearblue
Character (multi-byte UTF-8) is destroyed when character spanning `IO::BUF_SIZE` (4096 bytes) exist. - Prepare file: ```ruby File.open("sample", "wb") { |f| f << "●" * 1370 } ``` - Before patched: ```ruby File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a } # => ["●", "●", ..., "●", "\xe2", "\x97", "\x8f", "●", "●", "●", "●"] - After patched: ```ruby File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a } # => ["●", "●", ..., "●", "●", "●", "●", "●", "●"]
2019-09-16Small improvement for mruby-iodearblue
2019-09-16Fix `IO#pos`dearblue
2019-09-16Revert part of 8c90b5fc6dearblue
`IO#readline` and `IO#readchar` process in character units.
2019-09-15Merge pull request #4512 from lopopolo/patch-1Yukihiro "Matz" Matsumoto
Support parsing a Regexp literal with 'o' option
2019-09-14Add a macro `mrb_frozen_p` that points to `MRB_FROZEN_P`.Yukihiro "Matz" Matsumoto
2019-09-14Replace `String#byteslice` by custom `IO._bufread`.Yukihiro "Matz" Matsumoto
`byteslice` creates 2 string objects. `_bufread` creates one, and modifies the original buffer string, that is more efficient.
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()`