Skip to content

Commit

Permalink
Generate NodeName instance correctly from string input
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 17, 2015
1 parent 8885e81 commit ec0a31b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/droonga/serf.rb
Expand Up @@ -18,6 +18,7 @@
require "droonga/path"
require "droonga/loggable"
require "droonga/catalog/loader"
require "droonga/node_name"
require "droonga/node_metadata"
require "droonga/serf/downloader"
require "droonga/serf/agent"
Expand All @@ -39,7 +40,7 @@ def path

def initialize(name, options={})
@serf = nil
@name = NodeName.new(name)
@name = NodeName.parse(name)
@verbose = options[:verbose] || false
@service_installation = ServiceInstallation.new
@node_metadata = NodeMetadata.new
Expand Down Expand Up @@ -264,7 +265,7 @@ def detect_other_hosts
node == @name.to_s
end
other_nodes.collect do |node|
NodeName.new(node).host
NodeName.parse(node).host
end
end

Expand Down

0 comments on commit ec0a31b

Please sign in to comment.