From: Giles Bowkett Date: 2006-11-26T03:33:36+09:00 Subject: Re: how do I contribute to Ruby? > > Want to be the most evil person in the world? EVER? > > > > N.B.: Please don't do this =) > > > > require 'enumerator' > > > > objects = ObjectSpace.to_enum(:each_object) > > classes = objects.select {|o| Class === o} > > > > classes.each do |klass| > > klass.instance_eval { > > if [?A,?E,?I,?O,?U].include?(to_s[0]) > > alias_method :"is_an?", :"is_a?" > > undef_method :"is_a?" > > $stderr.puts "Was evil in Class: #{to_s}" > > end > > } > > end > > Actually, I didn't even think that one all the way through. That > won't work thank goodness ;) You know, this would make a pretty entertaining Ruby Quiz. Especially if you also had to make sure that is_a? User and is_an? Udder had to work properly as well. -- Giles Bowkett http://www.gilesgoatboy.org