lib/rufus/scheduler.rb in rufus-scheduler-3.1.10 vs lib/rufus/scheduler.rb in rufus-scheduler-3.2.0

- old
+ new

@@ -37,11 +37,11 @@ require 'rufus/scheduler/jobs' require 'rufus/scheduler/cronline' require 'rufus/scheduler/job_array' require 'rufus/scheduler/locks' - VERSION = '3.1.10' + VERSION = '3.2.0' # # A common error class for rufus-scheduler # class Error < StandardError; end @@ -383,11 +383,11 @@ # Takes extra care to answer true if the job is a repeat job # currently firing. # def scheduled?(job_or_job_id) - job, job_id = fetch(job_or_job_id) + job, _ = fetch(job_or_job_id) !! (job && job.unscheduled_at.nil? && job.next_time != nil) end # Lists all the threads associated with this scheduler. @@ -439,10 +439,10 @@ end if format == :timeline a = [] h.each { |j, ts| ts.each { |t| a << [ t, j ] } } - a.sort_by { |(t, j)| t } + a.sort_by { |(t, _)| t } else h end end