Skip to content

Commit 172d741

Browse files
committed
Fix Ruby 2.4 deprecation warning
warning: constant ::Fixnum is deprecated Historically `Fixnum` and `Bignum` are specific implementations of `Integer`. Historically, this implementation detail has been leaked which can cause some unexpected surprises. Most of the time this won't cause any issue. However, if the number happens to exceed the internal `Fixnum` limitation Ruby will provide you a `Bignum`. In these case, when neither `Bignum` nor `Integer` is referenced the code will likely fail or cause strange behavior as the expected path is not taken. To help people avoid this Ruby 2.4 hides these classes, as they are just implementation details, and lets people know they should be using `Integer`. While both the `Fixnum` and `Bignum` constants still exist they are simply aliases of `Integer`.
1 parent d2bcc18 commit 172d741

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kracken/json_api/public_exceptions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def numeric_code(status)
109109
case status
110110
when Symbol
111111
code = Rack::Utils::SYMBOL_TO_STATUS_CODE[status]
112-
when Fixnum
112+
when Integer
113113
code = status
114114
when String
115115
code = status.to_i

0 commit comments

Comments
 (0)