diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f8b679..a5bce7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Bump Sidekiq dependency to ~> 2.14.0. - Use ERB templates instead of slim. - Don't check if `Sidekiq::Web.tabs` is an Array in Sidetiq::Web. +- Fix Ruby parser warnings in web.rb. 0.3.6 ----- diff --git a/lib/sidetiq/web.rb b/lib/sidetiq/web.rb index 65bb600..3d81ac2 100644 --- a/lib/sidetiq/web.rb +++ b/lib/sidetiq/web.rb @@ -26,7 +26,7 @@ module Sidetiq @time = sidetiq_clock.gettime - @worker, @schedule = sidetiq_schedules.select do |worker, schedule| + @worker, @schedule = sidetiq_schedules.select do |worker, _| worker.name == name end.flatten @@ -36,8 +36,8 @@ module Sidetiq app.post "/sidetiq/:name/trigger" do halt 404 unless (name = params[:name]) - worker, _ = sidetiq_schedules.select do |worker, schedule| - worker.name == name + worker, _ = sidetiq_schedules.select do |w, _| + w.name == name end.flatten worker.perform_async