From 283418a785b5ea8b8eee56e6da181d6b91f4b155 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 23 Nov 2008 15:30:21 -0800 Subject: Lazy-require DRb for ActiveSupport::Cache::DRbStore --- activesupport/lib/active_support/cache/drb_store.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/cache/drb_store.rb b/activesupport/lib/active_support/cache/drb_store.rb index b80c2ee4d5..b16ed25aa3 100644 --- a/activesupport/lib/active_support/cache/drb_store.rb +++ b/activesupport/lib/active_support/cache/drb_store.rb @@ -1,15 +1,14 @@ -require 'drb' - module ActiveSupport module Cache class DRbStore < MemoryStore #:nodoc: attr_reader :address def initialize(address = 'druby://localhost:9192') + require 'drb' unless defined?(DRbObject) super() @address = address @data = DRbObject.new(nil, address) end end end -end \ No newline at end of file +end -- cgit v1.2.3