Permalink
Browse files

Lazy-require DRb for ActiveSupport::Cache::DRbStore

  • Loading branch information...
1 parent 51d155e commit 283418a785b5ea8b8eee56e6da181d6b91f4b155 @jeremy jeremy committed Nov 23, 2008
Showing with 2 additions and 3 deletions.
  1. +2 −3 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
+end

0 comments on commit 283418a

Please sign in to comment.