hallidave / ruby-snmp

A Ruby implementation of SNMP (the Simple Network Management Protocol).
MIT License
146 stars 63 forks source link

Stop mixing SNMP::BER into root namespace #16

Closed justfalter closed 6 years ago

justfalter commented 11 years ago

Previously, anyone who made use of ruby-snmp would find that SNMP::BER would end up being mixed into the root namespace (really, Object). This is generally a big no-no, unless it is very clear that the mixin is intended to extend every object within the ruby VM (and I don't believe that this is what has been intended with SNMP::BER).

This pull request modifies things so that the SNMP::BER methods are presented to only those classes that actually use them.

justfalter commented 11 years ago

Any thoughts on this?

woodbusy commented 10 years ago

+1 Just came across this same issue. Glad someone's already done the work; it would be great to get this merged in!