From 950d77bd955039602ccdd0031760e999a0586a8f Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Tue, 2 Feb 2010 14:31:57 +0100 Subject: [PATCH] SBDB::WeakHash: ::Hash statt Hash, da es sonst SBDB::Hash nimmt --- lib/sbdb/weakhash.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sbdb/weakhash.rb b/lib/sbdb/weakhash.rb index a61db32..d72dadb 100644 --- a/lib/sbdb/weakhash.rb +++ b/lib/sbdb/weakhash.rb @@ -5,10 +5,10 @@ module SBDB class WeakHash attr_reader :cache - def initialize cache = Hash.new + def initialize cache = ::Hash.new @cache = cache @key_map = {} - @rev_cache = Hash.new{|h,k| h[k] = {}} + @rev_cache = ::Hash.new{|h,k| h[k] = {}} @reclaim_value = lambda do |value_id| if @rev_cache.has_key? value_id @rev_cache[value_id].each_key{|key| @cache.delete key}