James Edward Gray II wrote: > I keep running into some warning message from standard libraries. I > always use warnings so they are driving me crazy. > > [...] I looked at patching set.rb myself but it seems that > there is a hack in there to work around this warning and I > couldn't figure out why it doesn't work. > Are you referring to this as the hack (in Class SortedSet) ? def setup # :nodoc: (:nodoc: is an RDoc instruction) > $ ruby -w set_example.rb > (eval):2: warning: method redefined; discarding old initialize Trying #remove_method before redefine gains a different warning:-/ lib/ruby/1.8/set.rb:457: warning: removing `initialize' may cause serious problem Only option seems to be temporary "$VERBOSE = false". Just 4 lines to add: --- set_ORIG.rb 2004-12-18 04:07:28.000000000 +-0100 +++ set.rb 2005-07-12 15:21:48.000000000 +-0100 @@ -440,19 +440,22 @@ def setup # :nodoc: @@setup and return begin require 'rbtree' + $VERBOSE, verbose = false, $VERBOSE module_eval %{ def initialize(*args, &block) @hash = RBTree.new super end } + $VERBOSE = verbose rescue LoadError + $VERBOSE, verbose = false, $VERBOSE module_eval %{ def initialize(*args, &block) @keys = nil super end @@ -497,12 +500,13 @@ def to_a (@keys = @hash.keys).sort! unless @keys @keys end } + $VERBOSE = verbose end @@setup = true end end > $ ruby -w prog_ruby_example_723.rb > wibble [0]: dprog_ruby_example_723.rb:19: warning: instance variable > completion_case_fold not initialized > ec > This and others were fixed around 2005-01-16 - too late for you :-( > ruby 1.8.2 (2004-12-25) [powerpc-darwin7.7.0] If I add this line before the loop in your script, it goes away: Readline.completion_case_fold = false > > James Edward Gray II > daz