diff options
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | test/ruby/test_dir_m17n.rb | 4 | ||||
| -rw-r--r-- | version.h | 6 |
3 files changed, 12 insertions, 4 deletions
@@ -1,3 +1,9 @@ +Thu Nov 24 05:44:04 2016 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org> + + * test/ruby/test_dir_m17n.rb: Don't encode to UTF-8 if it's unnecessary. + If the file system encoding is ISO-8851-1 or if the encoding of the + target string is invalid, don't encode to UTF-8. [Bug#12972] + Mon Nov 21 16:55:15 2016 boshan <boshan@subsplash.com> * lib/tempfile.rb (Tempfile#initialize): [DOC] the first parameter diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb index 4efc8ca34d..4e50b350da 100644 --- a/test/ruby/test_dir_m17n.rb +++ b/test/ruby/test_dir_m17n.rb @@ -376,7 +376,9 @@ class TestDir_M17N < Test::Unit::TestCase bug12081 = '[ruby-core:73868] [Bug #12081]' a = "*".force_encoding("us-ascii") result = Dir[a].map {|n| - if n.encoding == Encoding::ASCII_8BIT + if n.encoding == Encoding::ASCII_8BIT || + n.encoding == Encoding::ISO_8859_1 || + !n.valid_encoding? n.force_encoding(Encoding::UTF_8) else n.encode(Encoding::UTF_8) @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.3.3" -#define RUBY_RELEASE_DATE "2016-11-21" -#define RUBY_PATCHLEVEL 222 +#define RUBY_RELEASE_DATE "2016-11-24" +#define RUBY_PATCHLEVEL 223 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 11 -#define RUBY_RELEASE_DAY 21 +#define RUBY_RELEASE_DAY 24 #include "ruby/version.h" |
