summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2019-08-25 10:52:58 -0700
committerJeremy Evans <[email protected]>2019-08-25 10:56:47 -0700
commit71d97a5ef80a23b0bb1005570ed059580981a467 ()
tree1b44be385af5b6ea373d2567653d7ec3af9fde87 /sample
parent365e5b38a9ca24116a9c3133e0a0e8ce230ccb02 (diff)
Fix sample/drb/http0serv.rb
Previously, trying to use this would result in: undefined method `uri' for #<DRb::HTTP0::ServerSide:0x00000aec9f1637f8> (NoMethodError) Also, use a relative require to load sample/drb/http0.rb. Fixes [Bug #13431]
-rw-r--r--sample/drb/http0serv.rb8
1 files changed, 5 insertions, 3 deletions
@@ -1,6 +1,6 @@
require 'webrick'
require 'drb/drb'
-require 'drb/http0'
module DRb
module HTTP0
@@ -61,7 +61,7 @@ module DRb
def accept
client = @queue.pop
- ServerSide.new(client, @config)
end
def setup_webrick(uri)
@@ -79,12 +79,14 @@ module DRb
end
class ServerSide
- def initialize(callback, config)
@callback = callback
@config = config
@msg = DRbMessage.new(@config)
@req_stream = StrStream.new(@callback.req_body)
end
def close
@callback.close if @callback