Skip to content

Commit a997f37

Browse files
committed
Remove trailing whitespace
1 parent e04071b commit a997f37

File tree

8 files changed

+32
-32
lines changed

8 files changed

+32
-32
lines changed

command_line/dash_encoding_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44
before :each do
55
@test_string = "print [Encoding.default_external.name, Encoding.default_internal&.name].inspect"
66
end
7-
7+
88
describe 'sets Encoding.default_external and optionally Encoding.default_internal' do
99
it "if given a single encoding with an =" do
1010
ruby_exe(@test_string, options: '--disable-gems --encoding=big5').should == [Encoding::Big5.name, nil].inspect
1111
end
12-
12+
1313
it "if given a single encoding as a separate argument" do
1414
ruby_exe(@test_string, options: '--disable-gems --encoding big5').should == [Encoding::Big5.name, nil].inspect
1515
end
16-
16+
1717
it "if given two encodings with an =" do
1818
ruby_exe(@test_string, options: '--disable-gems --encoding=big5:utf-32be').should == [Encoding::Big5.name, Encoding::UTF_32BE.name].inspect
1919
end
20-
20+
2121
it "if given two encodings as a separate argument" do
2222
ruby_exe(@test_string, options: '--disable-gems --encoding big5:utf-32be').should == [Encoding::Big5.name, Encoding::UTF_32BE.name].inspect
2323
end
24-
24+
2525
it "if given two encodings as a separate argument" do
2626
ruby_exe(@test_string, options: '--disable-gems --encoding big5:utf-32be').should == [Encoding::Big5.name, Encoding::UTF_32BE.name].inspect
2727
end
2828
end
29-
29+
3030
it "does not accept a third encoding" do
3131
ruby_exe(@test_string, options: '--disable-gems --encoding big5:utf-32be:utf-32le', args: '2>&1').should =~ /extra argument for --encoding: utf-32le/
3232
end

command_line/dash_external_encoding_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
before :each do
55
@test_string = "print Encoding.default_external.name"
66
end
7-
7+
88
it "if given an encoding with an =" do
99
ruby_exe(@test_string, options: '--external-encoding=big5').should == Encoding::Big5.name
1010
end
11-
11+
1212
it "if given an encoding as a separate argument" do
1313
ruby_exe(@test_string, options: '--external-encoding big5').should == Encoding::Big5.name
1414
end

command_line/dash_internal_encoding_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
before :each do
55
@test_string = "print Encoding.default_internal.name"
66
end
7-
7+
88
it "if given an encoding with an =" do
99
ruby_exe(@test_string, options: '--internal-encoding=big5').should == Encoding::Big5.name
1010
end
11-
11+
1212
it "if given an encoding as a separate argument" do
1313
ruby_exe(@test_string, options: '--internal-encoding big5').should == Encoding::Big5.name
1414
end

command_line/dash_upper_k_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
before :each do
55
@test_string = "print [__ENCODING__&.name, Encoding.default_external&.name, Encoding.default_internal&.name].inspect"
66
end
7-
7+
88
describe 'sets __ENCODING__ and Encoding.default_external' do
99
it "to Encoding::ASCII_8BIT with -Ka" do
1010
ruby_exe(@test_string, options: '-Ka').should ==
@@ -15,7 +15,7 @@
1515
ruby_exe(@test_string, options: '-KA').should ==
1616
[Encoding::ASCII_8BIT.name, Encoding::ASCII_8BIT.name, nil].inspect
1717
end
18-
18+
1919
it "to Encoding::ASCII_8BIT with -Kn" do
2020
ruby_exe(@test_string, options: '-Kn').should ==
2121
[Encoding::ASCII_8BIT.name, Encoding::ASCII_8BIT.name, nil].inspect

language/fixtures/utf16-le-nobom.rb

1 Byte
Binary file not shown.

language/magic_comment_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
ruby_exe(nil, args: "< #{fixture(__FILE__, file)}", options: "-r#{print_at_exit}")
4747
}
4848
end
49-
49+
5050
describe "in an -e argument" do
5151
it_behaves_like :magic_comments, nil, -> file {
5252
print_at_exit = fixture(__FILE__, "print_magic_comment_result_at_exit.rb")
5353
ruby_exe(nil, args: "-r#{print_at_exit} -e \"$(< #{fixture(__FILE__, file)})\"")
5454
}
5555
end
56-
56+
5757
describe "in the main file" do
5858
it_behaves_like :magic_comments, nil, -> file {
5959
print_at_exit = fixture(__FILE__, "print_magic_comment_result_at_exit.rb")

language/safe_spec.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
require_relative '../spec_helper'
22

33
describe "The $SAFE variable" do
4-
4+
55
ruby_version_is "2.6" do
66
after :each do
77
$SAFE = 0
88
end
99
end
10-
10+
1111
it "is 0 by default" do
1212
$SAFE.should == 0
1313
proc {
1414
$SAFE.should == 0
1515
}.call
1616
end
17-
17+
1818
it "can be set to 0" do
1919
proc {
2020
$SAFE = 0
2121
$SAFE.should == 0
2222
}.call
2323
end
24-
24+
2525
it "can be set to 1" do
2626
proc {
2727
$SAFE = 1
2828
$SAFE.should == 1
2929
}.call
3030
end
31-
31+
3232
[2, 3, 4].each do |n|
3333
it "cannot be set to #{n}" do
3434
lambda {
@@ -38,7 +38,7 @@
3838
}.should raise_error(ArgumentError, /\$SAFE=2 to 4 are obsolete/)
3939
end
4040
end
41-
41+
4242
ruby_version_is ""..."2.6" do
4343
it "cannot be set to values below 0" do
4444
lambda {
@@ -56,7 +56,7 @@
5656
}.call
5757
}.should raise_error(ArgumentError, /\$SAFE=2 to 4 are obsolete/)
5858
end
59-
59+
6060
ruby_version_is ""..."2.6" do
6161
it "cannot be manually lowered" do
6262
proc {
@@ -66,15 +66,15 @@
6666
}.should raise_error(SecurityError, /tried to downgrade safe level from 1 to 0/)
6767
}.call
6868
end
69-
69+
7070
it "is automatically lowered when leaving a proc" do
7171
$SAFE.should == 0
7272
proc {
7373
$SAFE = 1
7474
}.call
7575
$SAFE.should == 0
7676
end
77-
77+
7878
it "is automatically lowered when leaving a lambda" do
7979
$SAFE.should == 0
8080
lambda {
@@ -83,11 +83,11 @@
8383
$SAFE.should == 0
8484
end
8585
end
86-
86+
8787
it "can be read when default from Thread#safe_level" do
8888
Thread.current.safe_level.should == 0
8989
end
90-
90+
9191
it "can be read when modified from Thread#safe_level" do
9292
proc {
9393
$SAFE = 1

language/source_encoding_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
require_relative '../spec_helper'
22

33
describe "Source files" do
4-
4+
55
describe "encoded in UTF-8 without a BOM" do
66
it "can be parsed" do
77
ruby_exe(fixture(__FILE__, "utf8-nobom.rb"), args: "2>&1").should == "hello\n"
88
end
99
end
10-
10+
1111
describe "encoded in UTF-8 with a BOM" do
1212
it "can be parsed" do
1313
ruby_exe(fixture(__FILE__, "utf8-bom.rb"), args: "2>&1").should == "hello\n"
1414
end
1515
end
16-
16+
1717
describe "encoded in UTF-16 LE without a BOM" do
1818
it "are parsed because empty as they contain a NUL byte before the encoding comment" do
1919
ruby_exe(fixture(__FILE__, "utf16-le-nobom.rb"), args: "2>&1").should == ""
2020
end
2121
end
22-
22+
2323
describe "encoded in UTF-16 LE with a BOM" do
2424
it "are invalid because they contain an invalid UTF-8 sequence before the encoding comment" do
2525
ruby_exe(fixture(__FILE__, "utf16-le-bom.rb"), args: "2>&1").should =~ /invalid multibyte char/
2626
end
2727
end
28-
28+
2929
describe "encoded in UTF-16 BE without a BOM" do
3030
it "are parsed as empty because they contain a NUL byte before the encoding comment" do
3131
ruby_exe(fixture(__FILE__, "utf16-be-nobom.rb"), args: "2>&1").should == ""
3232
end
3333
end
34-
34+
3535
describe "encoded in UTF-16 BE with a BOM" do
3636
it "are invalid because they contain an invalid UTF-8 sequence before the encoding comment" do
3737
ruby_exe(fixture(__FILE__, "utf16-be-bom.rb"), args: "2>&1").should =~ /invalid multibyte char/
3838
end
3939
end
40-
40+
4141
end

0 commit comments

Comments
 (0)