From ce10cf90c78d458826b56e9e03e55921dcb8e689 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Tue, 18 Jul 2017 11:49:23 -0400 Subject: [PATCH] Fix mapping of LONG for Ruby 2.4+ (Ruby 2.4.1) > irb > RUBY_VERSION < "2.4" ? [Fixnum, Bignum] : [Integer] => [Integer] (Ruby 2.3.3) > irb > RUBY_VERSION < "2.4" ? [Fixnum, Bignum] : [Integer] => [Fixnum, Bignum] --- proton-c/bindings/ruby/lib/codec/mapping.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proton-c/bindings/ruby/lib/codec/mapping.rb b/proton-c/bindings/ruby/lib/codec/mapping.rb index 4a7d5a7a23..f392b9cca6 100644 --- a/proton-c/bindings/ruby/lib/codec/mapping.rb +++ b/proton-c/bindings/ruby/lib/codec/mapping.rb @@ -96,7 +96,7 @@ def self.for_code(code) INT = Mapping.new(Cproton::PN_INT, "int") CHAR = Mapping.new(Cproton::PN_CHAR, "char") ULONG = Mapping.new(Cproton::PN_ULONG, "ulong") - LONG = Mapping.new(Cproton::PN_LONG, "long", [Fixnum, Bignum]) + LONG = Mapping.new(Cproton::PN_LONG, "long", RUBY_VERSION < "2.4" ? [Fixnum, Bignum] : [Integer]) TIMESTAMP = Mapping.new(Cproton::PN_TIMESTAMP, "timestamp", [Date, Time]) FLOAT = Mapping.new(Cproton::PN_FLOAT, "float") DOUBLE = Mapping.new(Cproton::PN_DOUBLE, "double", [Float])