diff options
author | nagachika <nagachika@ruby-lang.org> | 2021-10-09 15:08:38 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2021-10-09 15:08:38 +0900 |
commit | 2c947e74a0a11fe6c54253c15224dc80054c62a2 (patch) | |
tree | a1762cf792182842d3bcbd94ba05018095c1c30e /string.c | |
parent | fe9d33beb78d5c7932a5c2ca3953045c0ae751d5 (diff) |
merge revision(s) 60d0421ca861944459f52292d65dbf0ece26e38a,b6534691a16d751d59fc572d5dddebcaeb21f007,409dbc951b9875d27bd73748c88e15386473cffb,842b0008c132dd587f09766a228041afb7fed24f: [Backport #18191]
Fix the encoding of loaded feature names [Bug #18191]
The feature names loaded from the default load paths should also
be in the file system encoding.
---
ruby.c | 12 +++++++++++-
test/ruby/test_require.rb | 22 ++++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)
Copy path strings as interned strings
---
ruby.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Replace expanded load path only when modified
---
ruby.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Skip broken strings as the locale encoding
---
internal/string.h | 1 +
ruby.c | 11 +++++++----
string.c | 6 ++++++
3 files changed, 14 insertions(+), 4 deletions(-)
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -711,6 +711,12 @@ enc_coderange_scan(VALUE str, rb_encoding *enc, int encidx) } int +rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc) +{ + return enc_coderange_scan(str, enc, rb_enc_to_index(enc)); +} + +int rb_enc_str_coderange(VALUE str) { int cr = ENC_CODERANGE(str); |