summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-07-13Change type of a variable for signedness mismatch; ref #4573Yukihiro "Matz" Matsumoto
2019-07-13Avoid `mrb_funcall()` if possible using `mrb_Float()`; ref #4555Yukihiro "Matz" Matsumoto
2019-07-12Merge pull request #4571 from ↵Yukihiro "Matz" Matsumoto
shuujii/consider--MP-flag-specified-when-parsing-.d-file Consider `-MP` flag specified when parsing `.d` file
2019-07-12Merge pull request #4573 from dearblue/fix-4569Yukihiro "Matz" Matsumoto
Fix heap buffer overflow; fix #4569
2019-07-12Fix heap buffer overflow; fix #4569dearblue
2019-07-12Merge pull request #4572 from shuujii/lazy-load-tasks-toolchainsYukihiro "Matz" Matsumoto
Lazy load `tasks/toolchains/*.rake`
2019-07-12Lazy load `tasks/toolchains/*.rake`KOBAYASHI Shuji
2019-07-12Consider `-MP` flag specified when parsing `.d` fileKOBAYASHI Shuji
`-MP` flag is used in `tasks/toolchains/android.rake`.
2019-07-12Merge pull request #4569 from dearblue/improve-string-indexYukihiro "Matz" Matsumoto
Improve performance `String#index` with UTF-8
2019-07-11Add UTF-8 test for `String#index`dearblue
2019-07-11Improve performance `String#index` with UTF-8dearblue
Based on Boyer-Moore-Horspool algorithm (Quick Search algorithm). As a side effect, the correct position is returned even if an invalid UTF-8 string is given. ```console % ./mruby@master -e 'p ("\xd1" * 100 + "#").index("#")' 50 % ./mruby@improve-index -e 'p ("\xd1" * 100 + "#").index("#")' 100 ``` The other behavior should be the same as the current implementation.
2019-07-10Merge pull request #4568 from ↵Yukihiro "Matz" Matsumoto
shuujii/remove-an-unused-argument-of-str_with_class Remove an unused argument of `str_with_class()`
2019-07-10Remove an unused argument of `str_with_class()`KOBAYASHI Shuji
2019-07-09Merge pull request #4562 from ↵Yukihiro "Matz" Matsumoto
shuujii/set-MRB_STR_ASCII-flag-when-an-inline-symbol-is-stringized Set `MRB_STR_ASCII` flag when an inline symbol is stringized
2019-07-09Set `MRB_STR_ASCII` flag when an inline symbol is stringizedKOBAYASHI Shuji
2019-07-09Merge pull request #4560 from lopopolo/range-max-min-hangYukihiro "Matz" Matsumoto
Specialize Enumerable#max and Enumerable#min for Range
2019-07-09Revert Float dependency in Range#eachRyan Lopopolo
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-09Remove attempt at spec-compliant Range#max and Range#min from coreRyan Lopopolo
2019-07-09Merge pull request #4561 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-the-order-of-expected-and-actual-in-test-t-range.rb Fix the order of "expected" and "actual" in `test/t/range.rb`
2019-07-08Specialize Enumerable#max and Enumerable#min for RangeRyan Lopopolo
This patch prevents a hang for pathalogical (large) Ranges when computing max and min. Range inherits its implementation of max and min from Enumerable. Enumerable implements max and min by calling each. For Range objects, this is unnecessary since we know the max and the min by the end and begin attributes. It is also very slow. This code hangs unnecessarily: (0..2**32).max # ... hang (0..2**32).min # ... hang This patch overrides max and min after including enumerable to yield based on the begin and end methods.
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-07-08Add tests for Range#max and Range#minRyan Lopopolo
2019-07-09Fix the order of "expected" and "actual" in `test/t/range.rb`KOBAYASHI Shuji
2019-07-09Merge pull request #4559 from ↵Yukihiro "Matz" Matsumoto
shuujii/add-macros-for-inline-symbol-for-readability Add macros for inline symbol for readability
2019-07-08Add macros for inline symbol for readabilityKOBAYASHI Shuji
2019-07-08Merge pull request #4557 from shuujii/fix-Numeric-step-to-infinityYukihiro "Matz" Matsumoto
Fix `Numeric#step` to infinity; ref. #4555
2019-07-07Fix `Numeric#step` to infinity; ref. #4555KOBAYASHI Shuji
2019-07-06Merge pull request #4554 from shuujii/fix-missing--ifndef-MRB_ENABLE_ALL_SYMBOLSYukihiro "Matz" Matsumoto
Fix missing `#ifndef MRB_ENABLE_ALL_SYMBOLS`
2019-07-06Fix missing `#ifndef MRB_ENABLE_ALL_SYMBOLS`KOBAYASHI Shuji
2019-07-06Merge pull request #4553 from ↵Yukihiro "Matz" Matsumoto
shuujii/read-write-MRB_STR_ASCII-flag-only-when-MRB_UTF8_STRING-is-defined Read/write `MRB_STR_ASCII` flag only when `MRB_UTF8_STRING` is defined
2019-07-05Read/write `MRB_STR_ASCII` flag only when `MRB_UTF8_STRING` is definedKOBAYASHI Shuji
2019-07-04It was too early to check `key` for `undef`; ref #4534Yukihiro "Matz" Matsumoto
2019-07-04Rename `MRB_STR_NO_UTF` to 'MRB_STR_ASCII`; close #4550Yukihiro "Matz" Matsumoto
In #4550, @shuuji proposed the name name `MRB_STR_NO_MULTI_BYTE` for more precise description. Although I agree that the name name is correct, but the flag means the string does not contain multi byte UTF-8 characters, i.e. all characters fit in the range of ASCII.
2019-07-04Merge pull request #4551 from dearblue/fix-4549Yukihiro "Matz" Matsumoto
Fix heap buffer overflow; ref #4549
2019-07-04Fix heap buffer overflow; ref #4549dearblue
This patch is showed in #4549.
2019-07-04Merge pull request #4548 from shuujii/refine-document-to-mrb_get_argsYukihiro "Matz" Matsumoto
Refine document to mrb_get_args()` [ci skip]
2019-07-03Refine document to mrb_get_args()` [ci skip]KOBAYASHI Shuji
2019-07-02Merge pull request #4546 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-and-refine-error-message-in-mrb_obj_to_sym Fix and refine error message in `mrb_obj_to_sym()`
2019-07-02Fix and refine error message in `mrb_obj_to_sym()`KOBAYASHI Shuji
Before this patch: $ bin/mruby -e '1.respond_to?(2)' #=> nil is not a symbol After this patch (same as Ruby): $ bin/mruby -e '1.respond_to?(2)' #=> 2 is not a symbol nor a string
2019-07-02Merge pull request #4545 from shuujii/remove-unused-C-header-file-from-src-etc.cYukihiro "Matz" Matsumoto
Remove unused C header file from `src/etc.c`
2019-07-01Remove unused C header file from `src/etc.c`KOBAYASHI Shuji
2019-06-30Merge pull request #4544 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-include-prepend-and-extend-to-frozen-object Fix `include`, `prepend` and `extend` to frozen object
2019-06-30Fix `include`, `prepend` and `extend` to frozen objectKOBAYASHI Shuji
2019-06-29Merge pull request #4540 from dearblue/assert-nestingYukihiro "Matz" Matsumoto
Nested `assert` for mrbtest
2019-06-29Merge pull request #4541 from dearblue/replace-string-asetYukihiro "Matz" Matsumoto
Replace `String#[]=` method by C implements
2019-06-29Simplify `mrb_str_aref_m()` and `mrb_str_aref()`dearblue
It is integration with part of argument parsing used in `mrb_str_aset_m()`.
2019-06-29Replace `String#[]=` method by C implementsdearblue
The purpose is to eliminate string objects that are temporarily created during processing.