summaryrefslogtreecommitdiff
path: root/spec/ruby/library/bigdecimal/to_d_spec.rb
blob: 50aea99bf7ecbebf87cc9589eca09b28a6656d0f (plain)
1
2
3
4
5
6
7
8
9
10
require_relative '../../spec_helper'
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