diff options
| author | dearblue <[email protected]> | 2021-10-09 13:28:10 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-10-09 13:28:10 +0900 |
| commit | 8c355ec7e36eaccd7ac39b15fc340cf7894adc40 (patch) | |
| tree | 579db66c7a8e06277ecc4e93ed24aa5e1fe36c55 /src/kernel.c | |
| parent | bec074e6a31fd7a577e2c0e726167da8dc44c4c6 (diff) | |
| download | mruby-8c355ec7e36eaccd7ac39b15fc340cf7894adc40.tar.gz mruby-8c355ec7e36eaccd7ac39b15fc340cf7894adc40.zip | |
Partially allow overriding of `String#[]` methods
This is for the purpose of supporting `Regexp`.
- configuration and build
```console
% cat regexp_config.rb
MRuby::Lockfile.disable
MRuby::Build.new do
toolchain "clang"
enable_debug
gem core: "mruby-bin-mruby"
gem core: "mruby-print"
gem mgem: "mruby-onig-regexp"
#gem mgem: "mruby-regexp-pcre"
end
% rake MRUBY_CONFIG=regexp_config.rb
```
- mruby HEAD (bec074e)
```console
% build/host/bin/mruby -e 'p "abcdefg"[/.(?=...$)/]'
-e:1: can't convert OnigRegexp into Integer (TypeError)
```
- with this patch
```console
% build/host/bin/mruby -e 'p "abcdefg"[/.(?=...$)/]'
"d"
```
Diffstat (limited to 'src/kernel.c')
0 files changed, 0 insertions, 0 deletions
