From 6d3a206ffe465ecaa6a634f20fe4f8b5e870a948 Mon Sep 17 00:00:00 2001 From: Will Sulzer Date: Wed, 13 Nov 2013 14:25:46 -0800 Subject: [PATCH 1/2] Added rescue from NameError to the require ActiveSupport Inflections to provide (unofficial) support for the sidekiq process for Rails 2.3 --- lib/sidekiq/core_ext.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sidekiq/core_ext.rb b/lib/sidekiq/core_ext.rb index 932cfc9a..5c10ffff 100644 --- a/lib/sidekiq/core_ext.rb +++ b/lib/sidekiq/core_ext.rb @@ -90,7 +90,7 @@ end begin require 'active_support/core_ext/string/inflections' -rescue LoadError +rescue LoadError, NameError class String def constantize names = self.split('::') From 65bafb18e6940ef74b097035739bb237329d0c49 Mon Sep 17 00:00:00 2001 From: Will Sulzer Date: Wed, 13 Nov 2013 14:55:52 -0800 Subject: [PATCH 2/2] Added a comment to describe reason for NameError rescuing in core_ext. --- lib/sidekiq/core_ext.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sidekiq/core_ext.rb b/lib/sidekiq/core_ext.rb index 5c10ffff..27d92267 100644 --- a/lib/sidekiq/core_ext.rb +++ b/lib/sidekiq/core_ext.rb @@ -90,7 +90,7 @@ end begin require 'active_support/core_ext/string/inflections' -rescue LoadError, NameError +rescue LoadError, NameError # NameError is necessary to run Sidekiq unofficially on Rails 2.3 class String def constantize names = self.split('::')