From: James Edward Gray II Date: 2006-05-04T08:46:05+09:00 Subject: Re: Sharp knives and glue On May 3, 2006, at 5:56 PM, Jacob Fugal wrote: > On 5/3/06, James Edward Gray II wrote: >> I'm pretty confident the order Ruby loads code is a well defined >> process. >> Please show us some sample code. > > I think the core of what David is talking about comes down to this > point: > > $ cat foo.rb > class Foo > def quux > "This is one definition" > end > end > > $ cat bar.rb > class Foo > def quux > "This is another definition" > end > end > > $ cat baz1.rb > require 'foo' > require 'bar' > puts Foo.new.quux Luckily, Ruby does warn me there is a problem, as long as I use warnings: $ ruby -w baz1.rb ./bar.rb:2: warning: method redefined; discarding old quux This is another definition James Edward Gray II