瀏覽代碼

Fix warning by using Integer class rather than Fixnum

Fixnum and Bignum have been integrated as a single Integer class.

Previously this gave the warning: constant ::Fixnum is deprecated.

https://bugs.ruby-lang.org/issues/12005
main
Adrian Short 2 年之前
父節點
當前提交
6bd7a95702
Signed by untrusted user: adrian GPG Key ID: 4B54F9AE91AB06BB
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      lib/uk_planning_scraper/authority_scrape_params.rb

+ 3
- 3
lib/uk_planning_scraper/authority_scrape_params.rb 查看文件

@@ -12,7 +12,7 @@ module UKPlanningScraper
def validated_days(n)
# Validated within the last n days
# Assumes that every scraper/system can do a date range search
check_class(n, Fixnum)
check_class(n, Integer)

unless n > 0
raise ArgumentError.new("validated_days must be greater than 0")
@@ -26,7 +26,7 @@ module UKPlanningScraper
def received_days(n)
# received within the last n days
# Assumes that every scraper/system can do a date range search
check_class(n, Fixnum)
check_class(n, Integer)

unless n > 0
raise ArgumentError.new("received_days must be greater than 0")
@@ -40,7 +40,7 @@ module UKPlanningScraper
def decided_days(n)
# decided within the last n days
# Assumes that every scraper/system can do a date range search
check_class(n, Fixnum)
check_class(n, Integer)

unless n > 0
raise ArgumentError.new("decided_days must be greater than 0")


Loading…
取消
儲存