Skip to content

Commit

Permalink
Merge pull request #15 from fhir-crucible/bignum-warning
Browse files Browse the repository at this point in the history
Fix BigDecimal deprecation warning.
  • Loading branch information
radamson authored Feb 11, 2019
2 parents 631533a + c87c2cf commit 62cfbfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fhir_dstu2_models/bootstrap/hashable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def convert_primitive(value, meta)
elsif FHIR::DSTU2::PRIMITIVES.include?(meta['type'])
primitive_meta = FHIR::DSTU2::PRIMITIVES[meta['type']]
if primitive_meta['type'] == 'number'
rval = BigDecimal.new(value.to_s)
rval = BigDecimal(value.to_s)
rval = rval.frac.zero? ? rval.to_i : rval.to_f
end # primitive is number
end # boolean else
Expand Down

0 comments on commit 62cfbfd

Please sign in to comment.