Skip to content

Don't try to compare if decimal value is nil. #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/ib/support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ def read_decimal
## Values -1 and below indicate: Not computed (TickOptionComputation)
def read_decimal_limit_1
i= read_float
i <= -1 ? nil : i
return nil if i.nil?
return nil if i <= -1
i
end

## Values -2 and below indicate: Not computed (TickOptionComputation)
def read_decimal_limit_2
i= read_float
i <= -2 ? nil : i
return nil if i.nil?
return nil if i <= -2
i
end


Expand Down