summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-03-03 06:54:19 +1100
committerMatt Robinson <matt@puppetlabs.com>2011-03-22 00:33:17 -0700
commit66a4f361502864e8ea6ca3a11181851b7c313664 (patch)
tree7a728afb75ee997430a11b5e9e5fbe579ed9a392 /lib/puppet/util
parent335ce03ecc1fb9be2a2c5f59aaa7032a2d492c29 (diff)
downloadpuppet-66a4f361502864e8ea6ca3a11181851b7c313664.tar.gz
puppet-66a4f361502864e8ea6ca3a11181851b7c313664.tar.xz
puppet-66a4f361502864e8ea6ca3a11181851b7c313664.zip
Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevel
This came from the use of the @@colormap class variable. The variables has been changed to a constant.
Diffstat (limited to 'lib/puppet/util')
-rw-r--r--lib/puppet/util/log/destinations.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/util/log/destinations.rb b/lib/puppet/util/log/destinations.rb
index dd0d996bf..9550e2c3b 100644
--- a/lib/puppet/util/log/destinations.rb
+++ b/lib/puppet/util/log/destinations.rb
@@ -96,7 +96,7 @@ Puppet::Util::Log.newdesttype :console do
HWHITE = {:console => "", :html => "FFFFFF"}
RESET = {:console => "", :html => "" }
- @@colormap = {
+ Colormap = {
:debug => WHITE,
:info => GREEN,
:notice => CYAN,
@@ -117,11 +117,11 @@ Puppet::Util::Log.newdesttype :console do
end
def console_color(level, str)
- @@colormap[level][:console] + str + RESET[:console]
+ Colormap[level][:console] + str + RESET[:console]
end
def html_color(level, str)
- %{<span style="color: %s">%s</span>} % [@@colormap[level][:html], str]
+ %{<span style="color: %s">%s</span>} % [Colormap[level][:html], str]
end
def initialize