summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-23 18:23:07 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-23 18:23:07 +0000
commit7b70f0e22ac6a5edce3db3ffe199d61bc8e098bc (patch)
tree860ead0e95c5ccac2fea7ef9107a1b99a7de58e0
parentab3376b99289c50d7dee06f4dcb86e6a0e608b55 (diff)
merge revision(s) 54720: [Backport #12184]
* ruby.c: cygwin does not use w32_cmdvector, command line can be other than UTF-8. [ruby-dev:49519] [Bug #12184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ruby.c2
-rw-r--r--test/ruby/test_rubyoptions.rb13
-rw-r--r--version.h6
4 files changed, 20 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 959fbd7ddd..a8b54c26ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 24 03:05:47 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ruby.c: cygwin does not use w32_cmdvector, command line can be
+ other than UTF-8. [ruby-dev:49519] [Bug #12184]
+
Sat Apr 23 01:01:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval_jump.c (exec_end_procs_chain): restore previous error info
diff --git a/ruby.c b/ruby.c
index 56ad6c4442..c78093768a 100644
--- a/ruby.c
+++ b/ruby.c
@@ -369,7 +369,9 @@ translit_char_bin(char *p, int from, int to)
p++;
}
}
+#endif
+#ifdef _WIN32
# define UTF8_PATH 1
#endif
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 72672292b7..bb822eabcd 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -681,7 +681,8 @@ class TestRubyOptions < Test::Unit::TestCase
end
end
- if /mswin|mingw/ =~ RUBY_PLATFORM
+ case RUBY_PLATFORM
+ when /mswin|mingw/
def test_command_line_glob_nonascii
bug10555 = '[ruby-dev:48752] [Bug #10555]'
name = "\u{3042}.txt"
@@ -718,9 +719,7 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err(["-e", "", "test/*"], "", [], [], bug10941)
end
end
- end
- if /mswin|mingw/ =~ RUBY_PLATFORM
Ougai = %W[\u{68ee}O\u{5916}.txt \u{68ee 9d0e 5916}.txt \u{68ee 9dd7 5916}.txt]
def test_command_line_glob_noncodepage
with_tmpchdir do |dir|
@@ -730,6 +729,14 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err(["-e", "puts ARGV", "*.txt"], "", ougai)
end
end
+ when /cygwin/
+ def test_command_line_non_ascii
+ assert_separately([{"LC_ALL"=>"ja_JP.SJIS"}, "-", "\u{3042}".encode("SJIS")], <<-"end;")
+ bug12184 = '[ruby-dev:49519] [Bug #12184]'
+ a = ARGV[0]
+ assert_equal([Encoding::SJIS, 130, 160], [a.encoding, *a.bytes], bug12184)
+ end;
+ end
end
def test_script_is_directory
diff --git a/version.h b/version.h
index eaf663c818..06f009dbec 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.3.0"
-#define RUBY_RELEASE_DATE "2016-04-23"
-#define RUBY_PATCHLEVEL 106
+#define RUBY_RELEASE_DATE "2016-04-24"
+#define RUBY_PATCHLEVEL 107
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 4
-#define RUBY_RELEASE_DAY 23
+#define RUBY_RELEASE_DAY 24
#include "ruby/version.h"