Skip to content

Instantly share code, notes, and snippets.

@drbrain
Last active March 22, 2016 21:27
Show Gist options
  • Save drbrain/ed865cdbbab8e927a9e3 to your computer and use it in GitHub Desktop.
Save drbrain/ed865cdbbab8e927a9e3 to your computer and use it in GitHub Desktop.
By overriding DRb.here? we force DRb communication
require 'drb'
require 'drb/unix'
shared = []
DRb.start_service 'drbunix:', shared
loopback = DRb.uri
puts loopback
def DRb.here? uri
false
end
ro = DRbObject.new nil, loopback
ro << :a
puts shared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment