| Age | Commit message (Collapse) | Author |
|
|
|
Lazy load `tasks/toolchains/*.rake`
|
|
|
|
`-MP` flag is used in `tasks/toolchains/android.rake`.
|
|
Improve performance `String#index` with UTF-8
|
|
|
|
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.
|
|
shuujii/remove-an-unused-argument-of-str_with_class
Remove an unused argument of `str_with_class()`
|
|
|
|
shuujii/set-MRB_STR_ASCII-flag-when-an-inline-symbol-is-stringized
Set `MRB_STR_ASCII` flag when an inline symbol is stringized
|
|
|
|
Specialize Enumerable#max and Enumerable#min for Range
|
|
|
|
|
|
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.
|
|
|
|
|
|
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`
|
|
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.
|
|
Range#each depends on String#upto which is implemented in mruby-string-ext
which is why these tests live there.
|
|
|
|
|
|
shuujii/add-macros-for-inline-symbol-for-readability
Add macros for inline symbol for readability
|
|
|
|
Fix `Numeric#step` to infinity; ref. #4555
|
|
|
|
Fix missing `#ifndef MRB_ENABLE_ALL_SYMBOLS`
|
|
|
|
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
|
|
|
|
|
|
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.
|
|
Fix heap buffer overflow; ref #4549
|
|
This patch is showed in #4549.
|
|
Refine document to mrb_get_args()` [ci skip]
|
|
|
|
shuujii/fix-and-refine-error-message-in-mrb_obj_to_sym
Fix and refine error message in `mrb_obj_to_sym()`
|
|
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
|
|
Remove unused C header file from `src/etc.c`
|
|
|
|
shuujii/fix-include-prepend-and-extend-to-frozen-object
Fix `include`, `prepend` and `extend` to frozen object
|
|
|
|
Nested `assert` for mrbtest
|
|
Replace `String#[]=` method by C implements
|
|
It is integration with part of argument parsing used in `mrb_str_aset_m()`.
|
|
The purpose is to eliminate string objects that are temporarily created during processing.
|
|
|
|
|
|
Ref commit 35319bed01d58c785f73ce03e67d4e58be30f4b5
|
|
When nesting `assert` used in test, it is indented and displayed.
Assertion numbers are concatenated by `"-"` at this time.
The purpose is to match the apparent numbers when failing with `assert_mruby`
which is defined by `mrbgems/mruby-bin-mruby/bintest/mruby.rb` for example.
Child assertions "skip" and "info" are reported as parent assertions "info"
and `$ok_test += 1`. The child assertions "ko" and "crash" are reported as the
parent assertion "ko" and `$ko_test += 1`.
When child assertions are mixed, "ko" takes precedence.
Incompatibility:
- `$mrbtest_assert_idx` takes `nil` or an integer array object.
So far it was `nil` or an integer.
- `$asserts` points to the top of the internal stack in the `assert`.
- `$mrbtest_assert` points to the top of the internal stack in `assert`.
|