1- From fc347d3c3571264b7e35ebcac36762c084b01825 Mon Sep 17 00:00:00 2001
1+ From ab0eda3a4172a6def66559b680f46262fc702262 Mon Sep 17 00:00:00 2001
22From: Lars Kanis <lars@greiz-reinsdorf.de>
33Date: Wed, 2 Oct 2024 22:44:21 +0200
44Subject: [PATCH] Windows: Change command line interface to UTF-8
@@ -7,9 +7,10 @@ Subject: [PATCH] Windows: Change command line interface to UTF-8
77- include paths
88- script input from stdin
99---
10- ruby.c | 25 ++++---------------------
11- test/ruby/test_rubyoptions.rb | 14 +++-----------
12- 2 files changed, 7 insertions(+), 32 deletions(-)
10+ ruby.c | 25 ++++--------------------
11+ spec/ruby/language/magic_comment_spec.rb | 8 +++++++-
12+ test/ruby/test_rubyoptions.rb | 14 +++----------
13+ 3 files changed, 14 insertions(+), 33 deletions(-)
1314
1415diff --git a/ruby.c b/ruby.c
1516index 61de5cdcbe..e79d4b69da 100644
@@ -76,6 +77,25 @@ index 61de5cdcbe..e79d4b69da 100644
7677 }
7778 else {
7879 enc = rb_utf8_encoding();
80+ diff --git a/spec/ruby/language/magic_comment_spec.rb b/spec/ruby/language/magic_comment_spec.rb
81+ index f2bf3a08e5..98f424c3d0 100644
82+ --- a/spec/ruby/language/magic_comment_spec.rb
83+ +++ b/spec/ruby/language/magic_comment_spec.rb
84+ @@ -3,7 +3,13 @@
85+ # See core/kernel/eval_spec.rb for more magic comments specs for eval()
86+ describe :magic_comments, shared: true do
87+ before :each do
88+ - @default = @method == :locale ? Encoding.find('locale') : Encoding::UTF_8
89+ + @default = if @method == :locale &&
90+ + ( platform_is_not(:windows) || ruby_version_is(""..."3.4") )
91+ + then
92+ + Encoding.find('locale')
93+ + else
94+ + Encoding::UTF_8
95+ + end
96+ end
97+
98+ it "are optional" do
7999diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
80100index ac4b5870eb..fac0901fdf 100644
81101--- a/test/ruby/test_rubyoptions.rb
@@ -104,5 +124,5 @@ index ac4b5870eb..fac0901fdf 100644
104124 end
105125
106126- -
107- 2.47.1.windows.1
127+ 2.49.0
108128
0 commit comments