fix(app): fixnum is deprecated
Use Integer, since Fixnum and Bigint now belong to the same class in Ruby 2.4+
This commit is contained in:
parent
e08d7836c6
commit
812d546080
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue