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

This commit is contained in:
Jeremy Kemper
2010-04-28 15:20:04 -07:00
parent 209ab7e05b
commit 4e75cc59e7

View File

@@ -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