Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 99c5875

Browse files
committed
bot.mirror: conver #nil to string to use with #match
1 parent bc61397 commit 99c5875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/plugins/mirror.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def mirror_default(m)
2929
end
3030

3131
def mirror_monitor(m)
32-
if gs = @curl_data["f"]["report_time"].match(/^([0-9]{8})-([0-9]{2})([0-9]{2})([0-9]{2})/)
32+
if gs = @curl_data["f"]["report_time"].to_s.match(/^([0-9]{8})-([0-9]{2})([0-9]{2})([0-9]{2})/)
3333
date, h, m, s = gs[1], gs[2], gs[3], gs[4]
3434
offset = Time.now - Time.parse(sprintf("%s %s:%s:%s", date, h, m, s))
3535
if offset >= 5400 # 3600 + 1800 aka 1.5 hours

0 commit comments

Comments
 (0)