aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-04-28 15:20:04 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-04-28 15:20:35 -0700
commit4e75cc59e70947b794c96894d39c015f9e1cb96c (patch)
tree1bdb835dc8b50610459f937c9536cdb294f02b22 /activesupport/lib
parent209ab7e05b148b02a2f9598a809eb10588c92259 (diff)
downloadrails-4e75cc59e70947b794c96894d39c015f9e1cb96c.tar.gz
rails-4e75cc59e70947b794c96894d39c015f9e1cb96c.tar.bz2
rails-4e75cc59e70947b794c96894d39c015f9e1cb96c.zip
object_id may be negative, producing an invalid symbol. h/t Markus Schirp
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/cache/strategy/local_cache.rb2
1 files changed, 1 insertions, 1 deletions
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