Skip to content
Browse files

object_id may be negative, producing an invalid symbol. h/t Markus Sc…

…hirp
  • Loading branch information...
1 parent 209ab7e commit 4e75cc59e70947b794c96894d39c015f9e1cb96c @jeremy jeremy committed Apr 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/cache/strategy/local_cache.rb
View
2 activesupport/lib/active_support/cache/strategy/local_cache.rb
@@ -140,7 +140,7 @@ def delete_entry(key, options) # :nodoc:
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

0 comments on commit 4e75cc5

Please sign in to comment.
Something went wrong with that request. Please try again.