mperham/sidekiq — pull request #1474 by sepastian (2014-02-10 13:16:00+00:00)
Title: Sidekiq/web: require active_support/core_ext/object to fix paging scheduled jobs

Paging scheduled jobs fails with

NoMethodError at /sidekiq/scheduled
undefined method `try' for nil:NilClass
file: paginator.rb location: block in page line: 16

The Sidekiq web application has been mounted with

# config.ru
require 'sidekiq/web'
:
run Rack::URLMap.new(
'/sidekiq' => Sidekiq::Web
)

When accessing *http://localhost:9292/sidekiq/scheduled*, the error above occurs, because the Active Support's `#try` method is invoked at line 16 in *lib/sidekiq/paginator.rb* without requiring `active_support/core_ext/object` first.

This PR requires *active_support/core_ext/object* in *lib/sidekiq/core_ext.rb*, it does not handle *LoadError*. I am wondering why Sidekiq re-implements methods if loading Active Support fails? Wouldn't it be much easier for Sidekiq to just depend on Active Support?