summaryrefslogtreecommitdiff
path: root/spec/ruby/library/bigdecimal/to_d_spec.rb
blob: ae2f11fe6df7e0f3cc5d55ab15f925d29230cb79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require_relative '../../spec_helper'

ruby_version_is ""..."3.4" do
  require 'bigdecimal'
  require 'bigdecimal/util'

  describe "Float#to_d" do
    it "returns appropriate BigDecimal zero for signed zero" do
      -0.0.to_d.sign.should == -1
      0.0.to_d.sign.should == 1
    end
  end
end