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"