diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c index 6ab9a1ff7..518b62ea3 100644 --- a/src/string.c +++ b/src/string.c @@ -603,7 +603,7 @@ str_range_to_bytes(mrb_value str, mrb_int *pos, mrb_int *len) static inline mrb_value str_subseq(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len) { - str_range_to_bytes(str, &beg, &len); + if (!RSTR_ASCII_P(mrb_str_ptr(str))) str_range_to_bytes(str, &beg, &len); return mrb_str_byte_subseq(mrb, str, beg, len); } #else |
