From 4e75cc59e70947b794c96894d39c015f9e1cb96c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 28 Apr 2010 15:20:04 -0700 Subject: object_id may be negative, producing an invalid symbol. h/t Markus Schirp --- activesupport/lib/active_support/cache/strategy/local_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/cache/strategy') diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index 8942587ac8..81002da0a8 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache.rb @@ -140,7 +140,7 @@ module ActiveSupport private def thread_local_key - @thread_local_key ||= "#{self.class.name.underscore}_local_cache_#{self.object_id}".gsub("/", "_").to_sym + @thread_local_key ||= "#{self.class.name.underscore}_local_cache_#{object_id}".gsub(/[\/-]/, '_').to_sym end def local_cache -- cgit v1.2.3