From: daz Date: 2005-07-13T13:45:51+09:00 Subject: Re: Standard Library Warnings James Edward Gray II wrote: > On Jul 12, 2005, at 11:50 AM, daz wrote: > > > > >> No, I was referring to the one just a few lines down: > >> > >> module_eval { > >> # a hack to shut up warning > >> alias old_init initialize > >> remove_method :old_init > >> } > > > > Ah. That's not in my freeride build. > > Thank you. The was the hint I needed. > > The above hack is missing in the current versions of Ruby. I found > it in my old CVS checkout, so it was it there once upon a time. > Using it DOES eliminate the warning, which is why I couldn't figure > out what to patch. ;) > This fix has been in the MAIN (1.9) and 1.8 CVS branches since Mar 04 (looking at the ChangeLog). Perhaps you saw it here and applied it yourself at one point: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/132868 I would copy /lib/ruby/1.8/set.rb to /lib/ruby/site_ruby/1.8/set.rb and patch there. /site_ruby/ contains stuff _you've_ installed to the base and it's earlier in the search path ( puts $: ). On reinstall, it's not going to be overwritten but it can catch you out if you install a newer version in the default location. For that reason, at the same time as patching, I'll add a puts "** MOD ** #{__FILE__}" at the top of the script so that it appears when I do a require 'set'. This can be mildly irritating ;-) but also a useful prompt. - YMMV daz