summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-09-13Remove unnecessary files from `mruby-{io,pack,socket}`.Yukihiro "Matz" Matsumoto
2019-09-12Merge pull request #4703 from shuujii/refine-tasks-toolchains-gcc-clang.rakeYukihiro "Matz" Matsumoto
Refine `tasks/toolchains/(gcc|clang).rake`
2019-09-12Refine `tasks/toolchains/(gcc|clang).rake`KOBAYASHI Shuji
- Make sure to specify `-std=gnu99` for C compiler flag. - Make sure to specify `-Wzero-length-array` for C/C++ compiler flag (Clang). - Extract similar codes.
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-12Merge pull request #4527 from lopopolo/string-each-line-paragraph-modeYukihiro "Matz" Matsumoto
Add paragraph mode to String#each_line in mrblib
2019-09-12Use `mrb_str_inspect` instead of `mrb_str_dup`; fix #4678Yukihiro "Matz" Matsumoto
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-11Merge pull request #4701 from ↵Yukihiro "Matz" Matsumoto
shuujii/drop-test-dependency-from-mruby-string-ext-to-mruby-enumerator Drop test dependency from `mruby-string-ext` to `mruby-enumerator`
2019-09-11Drop test dependency from `mruby-string-ext` to `mruby-enumerator`KOBAYASHI Shuji
2019-09-10Merge pull request #4700 from shuujii/refine-documentation-for-C99-complianceYukihiro "Matz" Matsumoto
Refine documentation for C99 compliance; ref #4685 [ci skip]
2019-09-10Refine documentation for C99 compliance; ref #4685 [ci skip]KOBAYASHI Shuji
The refinement was based on comment from @matz.
2019-09-10Merge pull request #4699 from takkaw/mirb_lv_under_scoreYukihiro "Matz" Matsumoto
add special local variable _ in mirb
2019-09-09change _ variable in mirb to be enable by defaulttakkaw
2019-09-09Fix `mod.constants` not to have duplicate constant names; #4698Yukihiro "Matz" Matsumoto
The fix was based on PR from @dearblue
2019-09-09Remove duplication of `BasicObject` constant; fix #4698Yukihiro "Matz" Matsumoto
2019-09-09Merge pull request #4697 from shuujii/fix-Class.new-argument-specsYukihiro "Matz" Matsumoto
Fix `Class.new` argument specs
2019-09-09add special local variable _ in mirbtakkaw
2019-09-09Fix `Class.new` argument specsKOBAYASHI Shuji
2019-09-08Merge pull request #4695 from dearblue/promote-to-intYukihiro "Matz" Matsumoto
Fix `mrb_vformat()` crashes with `MRB_INT16`
2019-09-08Merge pull request #4694 from shuujii/optimize-mrb_bool-with-MRB_WORD_BOXINGYukihiro "Matz" Matsumoto
Optimize `mrb_bool()` with `MRB_WORD_BOXING`
2019-09-08Fix `mrb_vformat()` crashes with `MRB_INT16`dearblue
If `MRB_INT16` is specified, the variable length argument `mrb_int` is converted to `int`.
2019-09-08Optimize `mrb_bool()` with `MRB_WORD_BOXING`KOBAYASHI Shuji
2019-09-07Revert part of #4225Yukihiro "Matz" Matsumoto
Since in mruby, Integer and Float interchange frequently (mostly on overflow), so adding explicit `.0` can cause problems sometimes. For example: https://github.com/mattn/mruby-json/pull/40 https://github.com/pepabo/mruby-msd/pull/13 https://github.com/mattn/mruby-json/pull/42
2019-09-07Merge pull request #4693 from ↵Yukihiro "Matz" Matsumoto
shuujii/increase-symbol-bit-size-on-32-bit-mode-with-MRB_WORD_BOXING Increase symbol bit size on 32-bit mode with `MRB_WORD_BOXING`
2019-09-07Increase symbol bit size on 32-bit mode with `MRB_WORD_BOXING`KOBAYASHI Shuji
This change increases the max length of lower inline symbols to 5 bytes.
2019-09-06Merge pull request #4692 from shuujii/avoid-bit-fields-in-mrb_valueYukihiro "Matz" Matsumoto
Avoid bit fields in `mrb_value`; ref b2c3d88f
2019-09-06Avoid bit fields in `mrb_value`; ref b2c3d88fKOBAYASHI Shuji
The changes at b2c3d88f were inappropriate because the memory layout of bit fields are implementation defined. Therefor, I fixed it not to use bit fields.
2019-09-05Merge pull request #4691 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-Range-max-test-TypeError-is-raised-on-32-bit-mode-with-word-boxing Fix `Range#max` test (`TypeError` is raised) on 32-bit mode with word boxing
2019-09-05Merge pull request #4690 from takumakume/add_assert_not_nilYukihiro "Matz" Matsumoto
Add `assert_not_nil` method
2019-09-05add assert_not_nil methodtakumakume
2019-09-05Fix `Range#max` test (`TypeError` is raised) on 32-bit mode with word boxingKOBAYASHI Shuji
2019-09-05Merge pull request #4687 from shuujii/fix-argument-specs-to-BasicObjectYukihiro "Matz" Matsumoto
Fix argument specs to `BasicObject`
2019-09-04Fix argument specs to `BasicObject`KOBAYASHI Shuji
2019-09-04Merge pull request #4686 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-to-doc-limitations.md-about-nil-redefinition Add to `doc/limitations.md` about `nil?` redefinition; ref 4996709 [ci skip]
2019-09-03Add to `doc/limitations.md` about `nil?` redefinition; ref 4996709 [ci skip]KOBAYASHI 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-02Fix an error in refactoring; fix #4682Yukihiro "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-31Fix `mrb_immediate_p(MRB_TT_FREE)` to return `false`; ref #4679Yukihiro "Matz" Matsumoto
2019-08-31Refactor #4662 with different names.Yukihiro "Matz" Matsumoto
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-31Merge pull request #4679 from ↵Yukihiro "Matz" Matsumoto
shuujii/implement-mrb_immediate_p-macro-for-MRB_WORD_BOXING Implement `mrb_immediate_p` macro for `MRB_WORD_BOXING`
2019-08-31Implement `mrb_immediate_p` macro for `MRB_WORD_BOXING`KOBAYASHI Shuji
The default implementation of `mrb_immediate_p` uses `mrb_type`. However, in `MRB_WORD_BOXING`, `mrb_type` has many branches and is inefficient, so provide an implementation that does not use `mrb_type`.