Permalink
Browse files

revamp namespace parsing

  • Loading branch information...
1 parent 4f3375b commit f3b747fc4913b7b39edf5b49384cc73fedbd4f38 @qrush qrush committed Mar 22, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/daikon/monitor.rb
View
@@ -78,9 +78,8 @@ def push(split_command)
end
def incr_namespace(key)
- namespace, has_namespace = key.split(/(?::|-)/, 2)
- if has_namespace
- data["namespaces"][namespace] += 1
+ if marker = key =~ /:|-/
+ data["namespaces"][key[0...marker]] += 1
else
incr_global_namespace
end

0 comments on commit f3b747f

Please sign in to comment.