mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
10 lines
267 B
Ruby
10 lines
267 B
Ruby
![]() |
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
|