Skip to content

Commit

Permalink
Lazy-require DRb for ActiveSupport::Cache::DRbStore
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Nov 23, 2008
1 parent 51d155e commit 283418a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions activesupport/lib/active_support/cache/drb_store.rb
@@ -1,15 +1,14 @@
require 'drb'

module ActiveSupport module ActiveSupport
module Cache module Cache
class DRbStore < MemoryStore #:nodoc: class DRbStore < MemoryStore #:nodoc:
attr_reader :address attr_reader :address


def initialize(address = 'druby://localhost:9192') def initialize(address = 'druby://localhost:9192')
require 'drb' unless defined?(DRbObject)
super() super()
@address = address @address = address
@data = DRbObject.new(nil, address) @data = DRbObject.new(nil, address)
end end
end end
end end
end end

0 comments on commit 283418a

Please sign in to comment.