Skip to content

Commit ac372b8

Browse files
committed
bigdecimal 2
BigDecimal 2.0 no longer supports `.new`. looks like this gem uses both `BigDecimal(x)` and `BigDecimal.new(x)` - mind if we upgrade these last few calls?
1 parent c94d6c7 commit ac372b8

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
## 1.17.1
6+
- [#370](https://github.com/JsonApiClient/json_api_client/pull/370) - bigdecimal 2 support
7+
58
## 1.17.0
69

710
- [#364](https://github.com/JsonApiClient/json_api_client/pull/364) - Relax faraday and faraday middleware versions

lib/json_api_client/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def self.cast(value, _)
2929

3030
class Decimal
3131
def self.cast(value, _)
32-
BigDecimal.new(value)
32+
BigDecimal(value)
3333
end
3434
end
3535

lib/json_api_client/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JsonApiClient
2-
VERSION = "1.17.0"
2+
VERSION = "1.17.1"
33
end

test/unit/coercion_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ def validate_coercion_targets(target)
8888
assert_equal target.integer_me, 2
8989
assert_equal target.string_me, '1.0'
9090
assert_equal target.time_me, Time.parse(TIME_STRING)
91-
assert_equal target.decimal_me, BigDecimal.new('1.5')
91+
assert_equal target.decimal_me, BigDecimal('1.5')
9292
end
9393
end

0 commit comments

Comments
 (0)