Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fix class variable access from toplevel warnings #444

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

heffergm commented Feb 2, 2012

Fix class variable access from toplevel warnings:

** [out :: prod-fe-r01] /usr/local/rvm/gems/ruby-1.9.2-p290@puppet/gems/puppet-2.7.10/lib/puppet/provider/service/freebsd.rb:8: warning: class variable access from toplevel
** [out :: prod-fe-r01] /usr/local/rvm/gems/ruby-1.9.2-p290@puppet/gems/puppet-2.7.10/lib/puppet/provider/service/freebsd.rb:9: warning: class variable access from toplevel
** [out :: prod-fe-r01] /usr/local/rvm/gems/ruby-1.9.2-p290@puppet/gems/puppet-2.7.10/lib/puppet/provider/service/freebsd.rb:10: warning: class variable access from toplevel
** [out :: prod-fe-r01] /usr/local/rvm/gems/ruby-1.9.2-p290@puppet/gems/puppet-2.7.10/lib/puppet/provider/service/bsd.rb:12: warning: class variable access from toplevel

Contributor

slippycheeze commented Feb 2, 2012

@heffergm - thanks for submitting that. It looks like that is really a constant, just stored as a class variable - it never actually varies.

Even though Ruby constants are not as constant as you might imagine, it would be better to fix this using them, rather than setting a class variable.

jgn commented Mar 8, 2012

I am staring at these warning right now in Puppet 2.7.11 with Ruby 1.9.2 / Ubuntu 10.04, and . . .

It is a really tacky error message, and undermines one's confidence in Puppet.

I agree with @daniel-pittman that it would be better to really solve the problem, but right now, with Puppet 2.7.11 -- it's just gross to see these messages every time I do an apply. Ew. Don't let the perfect be the enemy of the good . . . preserve a solid OOB (out-of-box) experience . . .

Contributor

slippycheeze commented Mar 8, 2012

@tuker - this is targetted at Telly, not 2.7.x, so merging the change wouldn't actually have any local effect. We are working on better 1.9 support at the moment, and I appreciate the annoyance it presents. I hope to have something better shortly.

jgn commented Mar 8, 2012

Excellent.

Contributor

slippycheeze commented Mar 14, 2012

#575 has full support for tests and other code on Ruby 1.9.3, targetting Telly. If anyone interested wants to go and look at that, we would be very pleased. More testing is awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment