Skip to content
This repository has been archived by the owner on Jun 22, 2020. It is now read-only.

try travis for latest ruby version #1922

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ language: ruby
rvm:
- 2.3.4
- 2.4.1
- 2.5.3
- 2.5.6
- 2.6.5
before_install:
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
- gem install bundler -v '< 2'
4 changes: 2 additions & 2 deletions lib/cryptoexchange/helpers/numeric_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class << self
def to_d(number)
if !number.nil? || number != ""
num = number.to_s
num.empty? ? nil : BigDecimal.new(num)
num.empty? ? nil : BigDecimal(num)
else
nil
end
Expand All @@ -19,7 +19,7 @@ def divide(number, divisor)
end

def to_numeric(number)
result = BigDecimal.new(number.to_s)
result = BigDecimal(number.to_s)
if result.frac.zero?
result.to_i
else
Expand Down