puppetlabs / ruby-hocon

A Ruby port of the Typesafe Config library.
Apache License 2.0
34 stars 30 forks source link

(HC-80) Don't shadow ruby Class/Module#name method #77

Closed cprice404 closed 8 years ago

cprice404 commented 8 years ago

Prior to this commit, there were a few places in the code where we'd ported over a class-or-module-level method named name from the upstream library. This isn't a good idea in Ruby because it results in shadowing of the built in Ruby methods Class#name and Module#name. This was causing problems for some users, e.g. in cases where reflection is being used to examine classes.

In this commit we rename all such methods to something more specific, and replace the calls to the old names with calls to the new names.

cprice404 commented 8 years ago

Hopefully this will address #75 .

jpinsonault commented 8 years ago

is travis failing because it's looking for the non-existant 1.0.0 version of this gem? That seems screwed up for multiple reasons

jpinsonault commented 8 years ago

👍 looks good to me, travis will pass after the other PR is merged I think

janelu2 commented 8 years ago

Looks consistent, I also didn't find any other places that uses name. Should be good :+1: from me!