aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-23 15:30:21 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-23 15:30:21 -0800
commit283418a785b5ea8b8eee56e6da181d6b91f4b155 (patch)
tree07da934a3fb6081561bb8eba5b4cc7c1c93b5fad /activesupport
parent51d155e6971acef7fee87cb5e218e05cb87d8f57 (diff)
downloadrails-283418a785b5ea8b8eee56e6da181d6b91f4b155.tar.gz
rails-283418a785b5ea8b8eee56e6da181d6b91f4b155.tar.bz2
rails-283418a785b5ea8b8eee56e6da181d6b91f4b155.zip
Lazy-require DRb for ActiveSupport::Cache::DRbStore
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/cache/drb_store.rb5
1 files changed, 2 insertions, 3 deletions
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