Huh?

It looks to me like all that was needed was to add the _ back in to the
character class.  Special casing regexp is a bad idea because it means we
now have distinct (and thus potentially different) allowable character rule.

Also, I see that the A-Z got retained; it's clutter since the string is
being downcased right before that.

I'd suggest:

        def to_classname
-            to_s.downcase.gsub(/[^-a-zA-Z0-9:.]/,'').sub(/^\.+/,'')
+           to_s.downcase.gsub(/[^-a-z_0-9:.]/,'').sub(/^\.+/,'')
        end

-- Markus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to