From: Jeremy Kemper Date: 2005-10-06T01:43:03+09:00 Subject: Re: Ruby 1.8.3 breaks Needle's logger? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 5, 2005, at 8:23 AM, Daniel Berger wrote: > Jamis Buck wrote: >> On Oct 5, 2005, at 9:14 AM, Berger, Daniel wrote: >>> The problem was a hard coded "Format" constant in the Logger >>> class that >>> defined the format. This was bad, but not fatal. The >>> ActiveRecord/Nitro/Needle/Glue, etc, folks made it worse when, >>> instead >>> of subclassing, they redefined the Logger class and did things like >>> 'remove_const "Format"', among other questionable decisions. I'm >>> not >>> sure who wrote that code first but it was, unfortunately, copied and >>> used by several authors. >>> >> *Ahem*. For what it's worth, Needle *does* subclass Logger. ;) >> And subclassing is no protection against a change in an internal >> API. > > Well, in that case, I apologize to you Jamis, as I did not look at > the Needle code. However, I have seen snippets of the Glue and > ActiveSupport code that were affected because they abused open > classes. Whether you reopen or subclass Logger has little bearing; either way would have broken with 1.8.3. How you would solve this problem (or have avoided it)? Regards, jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDRAKRAQHALep9HFYRAg5RAKCxx5s7nEVxpH74foQbNyK+Kfv1/QCfUcFn nQ8WFShgnsLNPll0+fSkq7M= =aTXV -----END PGP SIGNATURE-----