Skip to content

Commit 57fa750

Browse files
committed
Exclude failing rounding tests on MRI.
1 parent e999aac commit 57fa750

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

spec/ruby/core/float/round_spec.rb

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,25 @@
109109
-5.55.round(1, half: :even).should eql(-5.6)
110110
end
111111

112-
it "does not lose precision during the rounding process" do
113-
767573.1875850001.round(5, half: nil).should eql(767573.18759)
114-
767573.1875850001.round(5, half: :up).should eql(767573.18759)
115-
767573.1875850001.round(5, half: :down).should eql(767573.18759)
116-
767573.1875850001.round(5, half: :even).should eql(767573.18759)
117-
-767573.1875850001.round(5, half: nil).should eql(-767573.18759)
118-
-767573.1875850001.round(5, half: :up).should eql(-767573.18759)
119-
-767573.1875850001.round(5, half: :down).should eql(-767573.18759)
120-
-767573.1875850001.round(5, half: :even).should eql(-767573.18759)
121-
767573.1875849998.round(5, half: nil).should eql(767573.18758)
122-
767573.1875849998.round(5, half: :up).should eql(767573.18758)
123-
767573.1875849998.round(5, half: :down).should eql(767573.18758)
124-
767573.1875849998.round(5, half: :even).should eql(767573.18758)
125-
-767573.1875849998.round(5, half: nil).should eql(-767573.18758)
126-
-767573.1875849998.round(5, half: :up).should eql(-767573.18758)
127-
-767573.1875849998.round(5, half: :down).should eql(-767573.18758)
128-
-767573.1875849998.round(5, half: :even).should eql(-767573.18758)
112+
ruby_bug "", ""..."3.2" do
113+
it "does not lose precision during the rounding process" do
114+
767573.1875850001.round(5, half: nil).should eql(767573.18759)
115+
767573.1875850001.round(5, half: :up).should eql(767573.18759)
116+
767573.1875850001.round(5, half: :down).should eql(767573.18759)
117+
767573.1875850001.round(5, half: :even).should eql(767573.18759)
118+
-767573.1875850001.round(5, half: nil).should eql(-767573.18759)
119+
-767573.1875850001.round(5, half: :up).should eql(-767573.18759)
120+
-767573.1875850001.round(5, half: :down).should eql(-767573.18759)
121+
-767573.1875850001.round(5, half: :even).should eql(-767573.18759)
122+
767573.1875849998.round(5, half: nil).should eql(767573.18758)
123+
767573.1875849998.round(5, half: :up).should eql(767573.18758)
124+
767573.1875849998.round(5, half: :down).should eql(767573.18758)
125+
767573.1875849998.round(5, half: :even).should eql(767573.18758)
126+
-767573.1875849998.round(5, half: nil).should eql(-767573.18758)
127+
-767573.1875849998.round(5, half: :up).should eql(-767573.18758)
128+
-767573.1875849998.round(5, half: :down).should eql(-767573.18758)
129+
-767573.1875849998.round(5, half: :even).should eql(-767573.18758)
130+
end
129131
end
130132

131133
it "raises FloatDomainError for exceptional values with a half option" do

0 commit comments

Comments
 (0)