Skip to content

Commit

Permalink
Use Integer instead of Fixnum
Browse files Browse the repository at this point in the history
The range of `Fixnum` is not guaranteed at all.  And ruby 2.4
unifies `Fixnum` and `Bignum` into `Integer`, and will deprecate
those two constants.
  • Loading branch information
nobu committed Sep 29, 2016
1 parent 83d8031 commit 050eb68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/simplecov/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def use_merging(use = nil)
# Configure with SimpleCov.merge_timeout(3600) # 1hr
#
def merge_timeout(seconds = nil)
@merge_timeout = seconds if seconds.is_a?(Fixnum)
@merge_timeout = seconds if seconds.is_a?(Integer)
@merge_timeout ||= 600
end

Expand Down
4 changes: 2 additions & 2 deletions lib/simplecov/source_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class Line

def initialize(src, line_number, coverage)
raise ArgumentError, "Only String accepted for source" unless src.is_a?(String)
raise ArgumentError, "Only Fixnum accepted for line_number" unless line_number.is_a?(Fixnum)
raise ArgumentError, "Only Fixnum and nil accepted for coverage" unless coverage.is_a?(Fixnum) || coverage.nil?
raise ArgumentError, "Only Integer accepted for line_number" unless line_number.is_a?(Integer)
raise ArgumentError, "Only Integer and nil accepted for coverage" unless coverage.is_a?(Integer) || coverage.nil?
@src = src
@line_number = line_number
@coverage = coverage
Expand Down

0 comments on commit 050eb68

Please sign in to comment.