Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
fix id edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Maxwell committed Oct 20, 2010
1 parent 1eb9691 commit 14cd613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gizzard/commands.rb
Expand Up @@ -422,7 +422,7 @@ def parse(obj, id = nil, depth = 0, sub = true)
host, prefix = obj.split("/")
host = "db" if host != "localhost" && sub
id ||= prefix[/\w+ward_\d+_\d+/]
prefix = (" " * depth) + host + "/" + (sub ? prefix.sub(id, "[ID]") : prefix)
prefix = (" " * depth) + host + "/" + ((sub && id) ? prefix.sub(id, "[ID]") : prefix)
[id, prefix]
when Array
obj.map do |e|
Expand Down

0 comments on commit 14cd613

Please sign in to comment.