From 812d54608030aa539c74f59531b984d3c2bd996d Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Sun, 14 Jul 2019 10:48:23 +0200 Subject: [PATCH] fix(app): fixnum is deprecated Use Integer, since Fixnum and Bigint now belong to the same class in Ruby 2.4+ --- gems/ruby-qx/lib/qx.rb | 2 +- lib/qexpr.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gems/ruby-qx/lib/qx.rb b/gems/ruby-qx/lib/qx.rb index 1db46b59..5434c1e8 100644 --- a/gems/ruby-qx/lib/qx.rb +++ b/gems/ruby-qx/lib/qx.rb @@ -455,7 +455,7 @@ class Qx # Quote a string for use in sql to prevent injection or weird errors # Always use this for all values! # Just uses double-dollar quoting universally. Should be generally safe and easy. - # Will return an unquoted value it it's a Fixnum + # Will return an unquoted value it it's a Integer def self.quote(val) if val.is_a?(Qx) val.parse diff --git a/lib/qexpr.rb b/lib/qexpr.rb index f66b14ee..e0948527 100644 --- a/lib/qexpr.rb +++ b/lib/qexpr.rb @@ -207,9 +207,9 @@ class Qexpr # Quote a string for use in sql to prevent injection or weird errors # Always use this for all values! # Just uses double-dollar quoting universally. Should be generally safe and easy. - # Will return an unquoted value it it's a Fixnum + # Will return an unquoted value it it's a Integer def self.quote(val) - if val.is_a?(Fixnum) || (val.is_a?(String) && val =~ /^\$Q\$.+\$Q\$$/) # is a valid num or already quoted + if val.is_a?(Integer) || (val.is_a?(String) && val =~ /^\$Q\$.+\$Q\$$/) # is a valid num or already quoted val elsif val == nil "NULL"