summaryrefslogtreecommitdiff
path: root/spec/ruby/core/float/uplus_spec.rb
blob: 75f18191ddb388a7d20e7d7c09abc2d532102057 (plain)
1
2
3
4
5
6
7
8
9
require File.expand_path('../../../spec_helper', __FILE__)

describe "Float#+@" do
  it "returns the same value with same sign (twos complement)" do
    34.56.send(:+@).should == 34.56
    -34.56.send(:+@).should == -34.56
    0.0.send(:+@).should eql(0.0)
  end
end