diff options
| author | takkanm <[email protected]> | 2016-11-12 09:20:49 +0900 |
|---|---|---|
| committer | takkanm <[email protected]> | 2016-11-12 09:22:10 +0900 |
| commit | 12d64338491b4d924911cd66b9e2c85dd56af358 (patch) | |
| tree | c74d024e0d23e274725a2ef965de3468e823a268 /lib | |
| parent | 731639b7d8871e79e96167b64c83f55e06bf78f6 (diff) | |
| download | caxlsx-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')
| -rw-r--r-- | lib/axlsx/drawing/pic.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/drawing/scaling.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/drawing/view_3D.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/util/simple_typed_list.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/util/validators.rb | 10 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb index 275a6d06..5a418df0 100644 --- a/lib/axlsx/drawing/pic.rb +++ b/lib/axlsx/drawing/pic.rb @@ -53,7 +53,7 @@ module Axlsx attr_reader :hyperlink # Picture opacity - # @return [Fixnum] + # @return [Integer] attr_reader :opacity # sets or updates a hyperlink for this image. diff --git a/lib/axlsx/drawing/scaling.rb b/lib/axlsx/drawing/scaling.rb index fcbea9f8..4c9d6888 100644 --- a/lib/axlsx/drawing/scaling.rb +++ b/lib/axlsx/drawing/scaling.rb @@ -6,7 +6,7 @@ module Axlsx include Axlsx::OptionsParser # creates a new Scaling object - # @option options [Integer, Fixnum] logBase + # @option options [Integer] logBase # @option options [Symbol] orientation # @option options [Float] max # @option options [Float] min @@ -35,7 +35,7 @@ module Axlsx attr_reader :min # @see logBase - def logBase=(v) DataTypeValidator.validate "Scaling.logBase", [Integer, Fixnum], v, lambda { |arg| arg >= 2 && arg <= 1000}; @logBase = v; end + def logBase=(v) DataTypeValidator.validate "Scaling.logBase", [Integer], v, lambda { |arg| arg >= 2 && arg <= 1000}; @logBase = v; end # @see orientation def orientation=(v) RestrictionValidator.validate "Scaling.orientation", [:minMax, :maxMin], v; @orientation = v; end # @see max diff --git a/lib/axlsx/drawing/view_3D.rb b/lib/axlsx/drawing/view_3D.rb index 9c320b4a..55bbc6c3 100644 --- a/lib/axlsx/drawing/view_3D.rb +++ b/lib/axlsx/drawing/view_3D.rb @@ -86,12 +86,12 @@ module Axlsx alias :rAngAx= :r_ang_ax= # @see perspective - def perspective=(v) + def perspective=(v) RangeValidator.validate "View3D.perspective", 0, 240, v @perspective = v end - # DataTypeValidator.validate "#{self.class}.perspective", [Integer, Fixnum], v, lambda {|arg| arg >= 0 && arg <= 240 }; @perspective = v; end + # DataTypeValidator.validate "#{self.class}.perspective", [Integer], v, lambda {|arg| arg >= 0 && arg <= 240 }; @perspective = v; end # Serializes the object # @param [String] str diff --git a/lib/axlsx/util/simple_typed_list.rb b/lib/axlsx/util/simple_typed_list.rb index 95f5b3f2..77bed775 100644 --- a/lib/axlsx/util/simple_typed_list.rb +++ b/lib/axlsx/util/simple_typed_list.rb @@ -147,7 +147,7 @@ module Axlsx # determines if the index is protected # @param [Integer] index def protected? index - return false unless locked_at.is_a? Fixnum + return false unless locked_at.is_a? Integer index < locked_at end 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) diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index 1d35b99d..6ef1a755 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -555,7 +555,7 @@ module Axlsx # @example This would set the first and third column widhts but leave the second column in autofit state. # ws.column_widths 7.2, nil, 3 # @note For updating only a single column it is probably easier to just set the width of the ws.column_info[col_index].width directly - # @param [Integer|Float|Fixnum|nil] widths + # @param [Integer|Float|nil] widths def column_widths(*widths) widths.each_with_index do |value, index| next if value == nil |
