summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authorKenta Murata <3959+mrkn@users.noreply.github.com>2022-12-26 21:02:47 +0900
committerGitHub <noreply@github.com>2022-12-26 21:02:47 +0900
commit9f2378959e5c5b5c39c9993f1a84e5304ff113d6 (patch)
treebe3582344869f036ed52b0c0a96e24d7c5655f9d /spec/ruby
parentbb60e4615f49a4dbc4f0eb776c8773feabb1a66f (diff)
numeric.c: Fix round_half_even for specific values (#7023)
Handle the integert and the float parts separately in round_half_even to prevent error occursions in floating point calculation.
Notes
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/float/round_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/float/round_spec.rb b/spec/ruby/core/float/round_spec.rb
index 50106025f9..e5a8f534e7 100644
--- a/spec/ruby/core/float/round_spec.rb
+++ b/spec/ruby/core/float/round_spec.rb
@@ -136,7 +136,7 @@ describe "Float#round" do
-4.809999999999999.round(5, half: :even).should eql(-4.81)
end
- ruby_bug "", ""..."3.4" do
+ ruby_bug "", ""..."3.3" do
# These numbers are neighbouring floating point numbers round a
# precise value. They test that the rounding modes work correctly
# round that value and precision is not lost which might cause