- 18 Aug, 2019 6 commits
-
-
Yukihiro "Matz" Matsumoto authored
Rename `mrb_shared_string::len` to `mrb_shared_string::capa`
-
Yukihiro "Matz" Matsumoto authored
Also use `str_init_shared` for `orig` in `str_make_shared()`
-
Yukihiro "Matz" Matsumoto authored
Prohibit changes to iseq in principle
-
KOBAYASHI Shuji authored
Because this field is used as capacity of string buffer.
-
KOBAYASHI Shuji authored
-
dearblue authored
-
- 17 Aug, 2019 11 commits
-
-
Yukihiro "Matz" Matsumoto authored
Refactor set/unset string type flags
-
KOBAYASHI Shuji authored
Introduce `RSTR_SET_TYPE_FLAG` macro to set the specified string type flag and clear the others.
-
Yukihiro "Matz" Matsumoto authored
Fix `String#rindex` with invalid UTF-8 string
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
dearblue authored
Previously `String#rindex` returned the wrong index when given an invalid UTF-8 string. ```terminal % ruby26 -e 'str = "\xf0
☀ \xf1☁ \xf2☂ \xf3☃ \xf0☀ \xf1☁ \xf2☂ \xf3☃ "; p str.rindex("☁ ")' 11 % ./mruby-head -e 'str = "\xf0☀ \xf1☁ \xf2☂ \xf3☃ \xf0☀ \xf1☁ \xf2☂ \xf3☃ "; p str.rindex("☁ ")' nil % ./mruby-patched -e 'str = "\xf0☀ \xf1☁ \xf2☂ \xf3☃ \xf0☀ \xf1☁ \xf2☂ \xf3☃ "; p str.rindex("☁ ")' 11 ``` -
Yukihiro "Matz" Matsumoto authored
-
dearblue authored
-
dearblue authored
-
Yukihiro "Matz" Matsumoto authored
-
- 16 Aug, 2019 7 commits
-
-
Yukihiro "Matz" Matsumoto authored
Merge pull request #4633 from shuujii/shared-fshared-string-is-not-required-when-sharing-nofree-string SHARED/FSHARED string is not required when sharing NOFREE string
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
KOBAYASHI Shuji authored
I think the string buffer of NOFREE string always exists and does not need to be released, so it can be shared as another NOFREE string. Also changed the `mrb_shared_string` field order so that eliminate padding if `int` and `mrb_int` sizes are less than pointer size.
-
Yukihiro "Matz" Matsumoto authored
But this changes requires `OP_ARYCAT` and `OP_ARYPUSH` to accept `nil` as their first operand. Alternative VMs (e.g. `mruby/c`) that understand mruby bytecode need to be updated.
-
Yukihiro "Matz" Matsumoto authored
Some `undef' functions may be called before initialization, thus causes infinite error recursion.
-
- 15 Aug, 2019 2 commits
-
-
Yukihiro "Matz" Matsumoto authored
Remove unneeded `#include` in `src/string.c`
-
KOBAYASHI Shuji authored
-
- 14 Aug, 2019 6 commits
-
-
Yukihiro "Matz" Matsumoto authored
Merge pull request #4631 from shuujii/extract-initialization-code-of-shared-and-fshared-string-to-function Extract initialization code of shared and fshared string to function
-
KOBAYASHI Shuji authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
Avoid calling `initialize` via `mrb_funcall`, which cause `cross C boundary` error from Fibers started in the method.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
* `mrb_vm_define_class` * `mrb_vm_define_module` Only functions called from user code requires `MRB_API`.
-
- 13 Aug, 2019 2 commits
-
-
Yukihiro "Matz" Matsumoto authored
Extract `struct RString` initialization code to function
-
KOBAYASHI Shuji authored
-
- 12 Aug, 2019 5 commits
-
-
Yukihiro "Matz" Matsumoto authored
`mrb_str_pool` can embed one more byte; ref #4626
-
KOBAYASHI Shuji authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
`mrb_str_modify_keep_ascii` can embed one more byte
-
Yukihiro "Matz" Matsumoto authored
-
- 11 Aug, 2019 1 commit
-
-
Yukihiro "Matz" Matsumoto authored
This reverts commit 3dc8d9d7.
-