Skip to content

Commit 70e326b

Browse files
herwinweregon
authored andcommitted
Remove ruby_version_is checks for 3.2.X
1 parent 5789284 commit 70e326b

3 files changed

Lines changed: 36 additions & 44 deletions

File tree

core/fiber/storage_spec.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,15 @@
8484
Fiber.new { Fiber[:life] }.resume.should be_nil
8585
end
8686

87-
ruby_version_is "3.2.3" do
88-
it "can use dynamically defined keys" do
89-
key = :"#{self.class.name}#.#{self.object_id}"
90-
Fiber.new { Fiber[key] = 42; Fiber[key] }.resume.should == 42
91-
end
87+
it "can use dynamically defined keys" do
88+
key = :"#{self.class.name}#.#{self.object_id}"
89+
Fiber.new { Fiber[key] = 42; Fiber[key] }.resume.should == 42
90+
end
9291

93-
it "can't use invalid keys" do
94-
invalid_keys = [Object.new, 12]
95-
invalid_keys.each do |key|
96-
-> { Fiber[key] }.should raise_error(TypeError)
97-
end
92+
it "can't use invalid keys" do
93+
invalid_keys = [Object.new, 12]
94+
invalid_keys.each do |key|
95+
-> { Fiber[key] }.should raise_error(TypeError)
9896
end
9997
end
10098

core/string/to_f_spec.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,10 @@
120120
"\3771.2".b.to_f.should == 0
121121
end
122122

123-
ruby_version_is "3.2.3" do
124-
it "raises Encoding::CompatibilityError if String is in not ASCII-compatible encoding" do
125-
-> {
126-
'1.2'.encode("UTF-16").to_f
127-
}.should raise_error(Encoding::CompatibilityError, "ASCII incompatible encoding: UTF-16")
128-
end
123+
it "raises Encoding::CompatibilityError if String is in not ASCII-compatible encoding" do
124+
-> {
125+
'1.2'.encode("UTF-16").to_f
126+
}.should raise_error(Encoding::CompatibilityError, "ASCII incompatible encoding: UTF-16")
129127
end
130128

131129
it "allows String representation without a fractional part" do

core/time/new_spec.rb

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -570,18 +570,16 @@ def obj.to_int; 3; end
570570
}.should raise_error(ArgumentError, /missing min part: 00 |can't parse:/)
571571
end
572572

573-
ruby_version_is "3.2.3" do
574-
it "raises ArgumentError if the time part is missing" do
575-
-> {
576-
Time.new("2020-12-25")
577-
}.should raise_error(ArgumentError, /no time information|can't parse:/)
578-
end
573+
it "raises ArgumentError if the time part is missing" do
574+
-> {
575+
Time.new("2020-12-25")
576+
}.should raise_error(ArgumentError, /no time information|can't parse:/)
577+
end
579578

580-
it "raises ArgumentError if day is missing" do
581-
-> {
582-
Time.new("2020-12")
583-
}.should raise_error(ArgumentError, /no time information|can't parse:/)
584-
end
579+
it "raises ArgumentError if day is missing" do
580+
-> {
581+
Time.new("2020-12")
582+
}.should raise_error(ArgumentError, /no time information|can't parse:/)
585583
end
586584

587585
it "raises ArgumentError if subsecond is missing after dot" do
@@ -720,24 +718,22 @@ def obj.to_int; 3; end
720718
}.should raise_error(ArgumentError, /can't parse.+ abc/)
721719
end
722720

723-
ruby_version_is "3.2.3" do
724-
it "raises ArgumentError when there are leading space characters" do
725-
-> { Time.new(" 2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
726-
-> { Time.new("\t2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
727-
-> { Time.new("\n2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
728-
-> { Time.new("\v2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
729-
-> { Time.new("\f2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
730-
-> { Time.new("\r2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
731-
end
721+
it "raises ArgumentError when there are leading space characters" do
722+
-> { Time.new(" 2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
723+
-> { Time.new("\t2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
724+
-> { Time.new("\n2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
725+
-> { Time.new("\v2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
726+
-> { Time.new("\f2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
727+
-> { Time.new("\r2020-12-02 00:00:00") }.should raise_error(ArgumentError, /can't parse/)
728+
end
732729

733-
it "raises ArgumentError when there are trailing whitespaces" do
734-
-> { Time.new("2020-12-02 00:00:00 ") }.should raise_error(ArgumentError, /can't parse/)
735-
-> { Time.new("2020-12-02 00:00:00\t") }.should raise_error(ArgumentError, /can't parse/)
736-
-> { Time.new("2020-12-02 00:00:00\n") }.should raise_error(ArgumentError, /can't parse/)
737-
-> { Time.new("2020-12-02 00:00:00\v") }.should raise_error(ArgumentError, /can't parse/)
738-
-> { Time.new("2020-12-02 00:00:00\f") }.should raise_error(ArgumentError, /can't parse/)
739-
-> { Time.new("2020-12-02 00:00:00\r") }.should raise_error(ArgumentError, /can't parse/)
740-
end
730+
it "raises ArgumentError when there are trailing whitespaces" do
731+
-> { Time.new("2020-12-02 00:00:00 ") }.should raise_error(ArgumentError, /can't parse/)
732+
-> { Time.new("2020-12-02 00:00:00\t") }.should raise_error(ArgumentError, /can't parse/)
733+
-> { Time.new("2020-12-02 00:00:00\n") }.should raise_error(ArgumentError, /can't parse/)
734+
-> { Time.new("2020-12-02 00:00:00\v") }.should raise_error(ArgumentError, /can't parse/)
735+
-> { Time.new("2020-12-02 00:00:00\f") }.should raise_error(ArgumentError, /can't parse/)
736+
-> { Time.new("2020-12-02 00:00:00\r") }.should raise_error(ArgumentError, /can't parse/)
741737
end
742738
end
743739
end

0 commit comments

Comments
 (0)