summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
AgeCommit message (Collapse)Author
2019-07-09Fix Range#min fast path with exclusive rangeRyan Lopopolo
2019-07-09Add a fast path for Float and Fixnum ranges for Range#max and Range#minRyan Lopopolo
If no block is given and the Range has Fixnum or Float endpoints, do not iterate with each and instead compare the endpoints directly. This implementation passes all of the applicable specs from Ruby Spec.
2019-07-09Add Range#max and Range#min tests from Ruby SpecRyan Lopopolo
2019-07-08Add tests for String RangesRyan Lopopolo
Range#each depends on String#upto which is implemented in mruby-string-ext which is why these tests live there.
2019-06-29Use nested `assert`dearblue
2019-06-29Use a normal method instead of a lambdadearblue
Ref commit 35319bed01d58c785f73ce03e67d4e58be30f4b5
2019-06-28Use `__ENCODING__` in testsKOBAYASHI Shuji
It cannot be used for `String#size` test if judging whether or not `MRB_UTF8_STRING` is defined by result of `String#size`.
2019-06-27Add modification tests for immediate valueKOBAYASHI Shuji
2019-06-26Merge pull request #4532 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-String-byteslice-with-MRB_UTF8_STRING-and-some-edge-cases Fix `String#byteslice` with `MRB_UTF8_STRING` and some edge cases
2019-06-26Merge pull request #4493 from dearblue/fix-rational-newYukihiro "Matz" Matsumoto
Fix rational new on 32 bits mode
2019-06-26Merge pull request #4492 from dearblue/fix-complex-newYukihiro "Matz" Matsumoto
Fix complex new on 32 bits mode
2019-06-25Fix `String#byteslice` with `MRB_UTF8_STRING` and some edge casesKOBAYASHI Shuji
Example: $ bin/mruby -e ' p "あa".byteslice(1) p "bar".byteslice(3) p "bar".byteslice(4..0) ' Before this patch: "a" "" RangeError (4..0 out of range) After this patch (same as Ruby): "\x81" nil nil
2019-06-25Merge pull request #4528 from shuujii/fix-argument-specs-to-ArrayYukihiro "Matz" Matsumoto
Fix argument specs to `Array`
2019-06-25Fixed a bug caused by `to_s` that returns `nil`; fix 4504Yukihiro "Matz" Matsumoto
2019-06-25Renamed `stacked` to `onstack`; ref #4523Yukihiro "Matz" Matsumoto
2019-06-23Fix argument specs to `Array`KOBAYASHI Shuji
2019-06-23Merge pull request #4523 from dearblue/use-stackYukihiro "Matz" Matsumoto
Use stack memory for small name of Struct members
2019-06-22Merge pull request #4518 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-ISO-section-number-to-Kernel-local_variables Add ISO section number to `Kernel.#local_variables` [ci skip]
2019-06-22Use stack memory for small name of Struct membersdearblue
2019-06-21Move `Kernel#__send__` test to core from `mruby-metaprog`KOBAYASHI Shuji
2019-06-20Add ISO section number to `Kernel.#local_variables` [ci skip]KOBAYASHI Shuji
2019-06-19Merge pull request #4510 from shuujii/remove-unneeded-mrb_str_dup-in-Module-nameYukihiro "Matz" Matsumoto
Remove unneeded `mrb_str_dup()` in `Module#name`
2019-06-18Fix path of `error.h`.Hiroshi Mimaki
2019-06-17Remove unneeded `mrb_str_dup()` in `Module#name`KOBAYASHI Shuji
`mrb_class_path()` always returns a new string or `nil`.
2019-06-17Merge pull request #4508 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-cvar-ivar-const-and-method-can-be-removed-to-frozen-object Fix cvar, ivar, const and method can be removed to frozen object
2019-06-17Merge pull request #4507 from shuujii/fix-index-in-error-message-of-Struct-arefYukihiro "Matz" Matsumoto
Fix index in error message of `Struct#[]`
2019-06-17Fixed indentation in parse.yYukihiro "Matz" Matsumoto
2019-06-17Allow newlines and comments between method calls.Yukihiro "Matz" Matsumoto
2019-06-17Support `&.` at the beginning of the line.Yukihiro "Matz" Matsumoto
2019-06-17Fixed wrong behavior on `..` at the beginning of the line.Yukihiro "Matz" Matsumoto
2019-06-17Merge pull request #4502 from ↵Yukihiro "Matz" Matsumoto
shuujii/adjust-allocation-size-in-mrb_id_attrset-mruby-struct Adjust allocation size in `mrb_id_attrset()` (`mruby-struct`)
2019-06-16Fix cvar, ivar, const and method can be removed to frozen objectKOBAYASHI Shuji
2019-06-15Fix index in error message of `Struct#[]`KOBAYASHI Shuji
Before this patch: $ bin/mruby -e 'Struct.new(:a,:b).new[-3]' #=> offset -1 too small for struct(size:2) (IndexError) After this patch (same as Ruby): $ bin/mruby -e 'Struct.new(:a,:b).new[-3]' #=> offset -3 too small for struct(size:2) (IndexError)
2019-06-14Remove a meaningless branch condition in `mruby-struct`KOBAYASHI Shuji
The following branch condition is always true: // mrbgems/mruby-struct/src/struct.c:187 in make_struct_define_accessors() if (is_local_id(mrb, name) || is_const_id(mrb, name)) {
2019-06-13Fix class name validation in `Struct.new`KOBAYASHI Shuji
Before this patch: $ bin/mruby -e 'p Struct.new("A-")' #=> Struct::"A-" After this patch: $ bin/mruby -e 'p Struct.new("A-")' #=> NameError: identifier A- needs to be constant
2019-06-13Merge pull request #4500 from ↵Yukihiro "Matz" Matsumoto
shuujii/kernel-global_variables-should-not-include-undefined-gvar `Kernel#global_variables` should not include undefined `$1`-`$9`
2019-06-12Fix typo in `String#setbyte` error messageKOBAYASHI Shuji
2019-06-12Adjust allocation size in `mrb_id_attrset()` (`mruby-struct`)KOBAYASHI Shuji
2019-06-11Remove redundant colon in `Proc#inspect` (`mruby-proc-ext`)KOBAYASHI Shuji
Before this patch: $ bin/mruby -e 'p proc{}' #=> #<Proc:0x7fd5eb8206d0@-e::1> After this patch: $ bin/mruby -e 'p proc{}' #=> #<Proc:0x7fd5eb8206d0@-e:1>
2019-06-11Merge pull request #4496 from dearblue/replace-obsoleteYukihiro "Matz" Matsumoto
Replace obsolete macros
2019-06-10`Kernel#global_variables` should not include undefined `$1`-`$9`KOBAYASHI Shuji
- They are not include in Ruby. - Appear in duplicate when `$1`-`$9` are defined.
2019-06-10Merge pull request #4495 from shuujii/remove-Kernel-global_variables-from-coreYukihiro "Matz" Matsumoto
Remove `Kernel#global_variables` from core
2019-06-07Replace obsolete macrosdearblue
2019-06-07Remove `Kernel#global_variables` from coreKOBAYASHI Shuji
This method is defined in `mruby-metaprog` gem.
2019-06-06Clarify `mruby-(kernel|object)-ext` gem summary; ref 8e637bdd [ci skip]KOBAYASHI Shuji
2019-06-05Drop precisions for rational when big numbersdearblue
2019-06-05Fix build error if `struct mrb_rational` is bigger than `RIStruct`dearblue
In that case, to be switched implementation with `RData`. It is based to "complex".
2019-06-05Fix not frozen in `Complex` method by `RData`dearblue
Object allocation was separated, and initialization was made common.
2019-06-05Fix memory leak in `Complex` method by `RData`dearblue
If `Data_Wrap_Struct()` raises a `NoMemoryError` exception, it will leak memory if it does `mrb_malloc()` first.
2019-06-02Fix missing assertions in `mruby-objectspace` testKOBAYASHI Shuji