diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-06-25 22:58:21 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-06-25 23:09:23 +0900 |
| commit | 75df13a97334c162b2cf743c3e37c4933a4b0d1c (patch) | |
| tree | 60968fa95933371218ab05d2493bd78d579e8445 /src/opcode.h | |
| parent | cb3ee2d0501612f406e2d44b1e6d55b18861b1e1 (diff) | |
| download | mruby-75df13a97334c162b2cf743c3e37c4933a4b0d1c.tar.gz mruby-75df13a97334c162b2cf743c3e37c4933a4b0d1c.zip | |
Fix `String#byteslice` with `MRB_UTF8_STRING` and some edge cases
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
Diffstat (limited to 'src/opcode.h')
0 files changed, 0 insertions, 0 deletions
