diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2021-02-28 17:40:22 +0100 |
---|---|---|
committer | Lars Kanis <lars@greiz-reinsdorf.de> | 2021-02-28 17:40:22 +0100 |
commit | aa260e3f44fff319faa951ced6c1ec6d906dba41 (patch) | |
tree | e92850f7ce30601aa1d7179e7f32622650faab61 | |
parent | f22bbe49d716a6361ba7832f9262ed4e16649275 (diff) | |
download | ffi-aa260e3f44fff319faa951ced6c1ec6d906dba41.tar.gz |
Fix unsafe floating point comparison
-rw-r--r-- | spec/ffi/callback_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ffi/callback_spec.rb b/spec/ffi/callback_spec.rb index 53ff1e4..972119d 100644 --- a/spec/ffi/callback_spec.rb +++ b/spec/ffi/callback_spec.rb @@ -264,7 +264,7 @@ module CallbackSpecs it "returning double" do pr = proc { 42.0 } - expect(LibTest.testCallbackVrDva(3.0, :cbVrD, pr)).to eq(45.0) + expect(LibTest.testCallbackVrDva(3.0, :cbVrD, pr)).to be_within(0.0000001).of(45.0) end it "returning :pointer (nil)" do |