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 /internal/string.h | |
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 'internal/string.h')
-rw-r--r-- | internal/string.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/string.h b/internal/string.h index 8907a1a6e6..adc8385cb6 100644 --- a/internal/string.h +++ b/internal/string.h @@ -43,6 +43,7 @@ size_t rb_str_memsize(VALUE); char *rb_str_to_cstr(VALUE str); const char *ruby_escaped_char(int c); void rb_str_make_independent(VALUE str); +int rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc); static inline bool STR_EMBED_P(VALUE str); static inline bool STR_SHARED_P(VALUE str); |