summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/util/validators.rb
diff options
context:
space:
mode:
authortakkanm <[email protected]>2016-11-12 09:20:49 +0900
committertakkanm <[email protected]>2016-11-12 09:22:10 +0900
commit12d64338491b4d924911cd66b9e2c85dd56af358 (patch)
treec74d024e0d23e274725a2ef965de3468e823a268 /lib/axlsx/util/validators.rb
parent731639b7d8871e79e96167b64c83f55e06bf78f6 (diff)
downloadcaxlsx-12d64338491b4d924911cd66b9e2c85dd56af358.tar.gz
caxlsx-12d64338491b4d924911cd66b9e2c85dd56af358.zip
fix warning: constant ::Fixnum is deprecated
fix Fixnum deprecated warning on Ruby2.4-preview3. Fixnum was unify into Integer. https://bugs.ruby-lang.org/issues/12005
Diffstat (limited to 'lib/axlsx/util/validators.rb')
-rw-r--r--lib/axlsx/util/validators.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb
index 9c6f34aa..2b4afd8d 100644
--- a/lib/axlsx/util/validators.rb
+++ b/lib/axlsx/util/validators.rb
@@ -80,16 +80,16 @@ module Axlsx
end
UINT_VALIDATOR = lambda { |arg| arg.respond_to?(:>=) && arg >= 0 }
-
- # Requires that the value is a Fixnum or Integer and is greater or equal to 0
+
+ # Requires that the value is a Integer and is greater or equal to 0
# @param [Any] v The value validated
- # @raise [ArgumentError] raised if the value is not a Fixnum or Integer value greater or equal to 0
+ # @raise [ArgumentError] raised if the value is not a Integer value greater or equal to 0
# @return [Boolean] true if the data is valid
def self.validate_unsigned_int(v)
DataTypeValidator.validate(:unsigned_int, Integer, v, UINT_VALIDATOR)
end
- # Requires that the value is a Fixnum Integer or Float and is greater or equal to 0
+ # Requires that the value is a Integer or Float and is greater or equal to 0
# @param [Any] v The value validated
# @raise [ArgumentError] raised if the value is not a Fixnun, Integer, Float value greater or equal to 0
# @return [Boolean] true if the data is valid
@@ -104,7 +104,7 @@ module Axlsx
end
# Requires that the value is a form that can be evaluated as a boolean in an xml document.
- # The value must be an instance of Fixnum, String, Integer, Symbol, TrueClass or FalseClass and
+ # The value must be an instance of String, Integer, Symbol, TrueClass or FalseClass and
# it must be one of 0, 1, "true", "false", :true, :false, true, false, "0", or "1"
# @param [Any] v The value validated
def self.validate_boolean(v)