Skip to content

Commit ed03c4d

Browse files
committed
merge revision(s) 54720: [Backport ruby#12184]
* ruby.c: cygwin does not use w32_cmdvector, command line can be other than UTF-8. [ruby-dev:49519] [Bug ruby#12184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent ba1bd67 commit ed03c4d

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Tue Apr 26 13:18:59 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* ruby.c: cygwin does not use w32_cmdvector, command line can be
4+
other than UTF-8. [ruby-dev:49519] [Bug #12184]
5+
16
Tue Apr 26 13:16:41 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
27

38
* eval_jump.c (exec_end_procs_chain): restore previous error info

ruby.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ translit_char_bin(char *p, int from, int to)
338338
p++;
339339
}
340340
}
341+
#endif
341342

343+
#ifdef _WIN32
342344
# define UTF8_PATH 1
343345
#endif
344346

test/ruby/test_rubyoptions.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,8 @@ def test_unmatching_glob
698698
end
699699
end
700700

701-
if /mswin|mingw/ =~ RUBY_PLATFORM
701+
case RUBY_PLATFORM
702+
when /mswin|mingw/
702703
def test_command_line_glob_nonascii
703704
bug10555 = '[ruby-dev:48752] [Bug #10555]'
704705
name = "\u{3042}.txt"
@@ -728,9 +729,7 @@ def test_command_line_glob_with_dir
728729
assert_in_out_err(["-e", "", "test/*"], "", [], [], bug10941)
729730
end
730731
end
731-
end
732732

733-
if /mswin|mingw/ =~ RUBY_PLATFORM
734733
Ougai = %W[\u{68ee}O\u{5916}.txt \u{68ee 9d0e 5916}.txt \u{68ee 9dd7 5916}.txt]
735734
def test_command_line_glob_noncodepage
736735
with_tmpchdir do |dir|
@@ -740,6 +739,14 @@ def test_command_line_glob_noncodepage
740739
assert_in_out_err(["-e", "puts ARGV", "*.txt"], "", ougai)
741740
end
742741
end
742+
when /cygwin/
743+
def test_command_line_non_ascii
744+
assert_separately([{"LC_ALL"=>"ja_JP.SJIS"}, "-", "\u{3042}".encode("SJIS")], <<-"end;")
745+
bug12184 = '[ruby-dev:49519] [Bug #12184]'
746+
a = ARGV[0]
747+
assert_equal([Encoding::SJIS, 130, 160], [a.encoding, *a.bytes], bug12184)
748+
end;
749+
end
743750
end
744751

745752
def test_script_is_directory

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.2.5"
22
#define RUBY_RELEASE_DATE "2016-04-26"
3-
#define RUBY_PATCHLEVEL 315
3+
#define RUBY_PATCHLEVEL 316
44

55
#define RUBY_RELEASE_YEAR 2016
66
#define RUBY_RELEASE_MONTH 4

0 commit comments

Comments
 (0)