From: Daniel Brockman Date: 2005-07-18T02:20:16+09:00 Subject: Re: `not' in parameter lists We could always do this: class Negator instance_methods.each { |x| undef_method x if x[-1] == ?? } def initialize object @object = object end def method_missing name, *args, &block name.to_s[-1] == ?? or super not @object.__send__ name, *args, &block end end class Object def not @__negator__ ||= Negator.new self end alias_method :does_not, :not alias_method :do_not, :not end assert pet_class.ancestors.do_not.include?(Monster) @pet = pet_class.new assert @pet.does_not.respond_to?(:roar!) 3.times { @pet.feed Apple.new } assert @pet.not.hungry? (Finally a context in which the name ‘respond_to?’ sounds right.) It would be nice to be able to get rid of those pesky parens, though: assert pet_class.ancestors.do_not.include? Monster assert @pet.does_not.respond_to? :roar! Is there any word on the chances of this becoming allowed in the future? I mean, is it definitely ruled out, or is there room for persuation? -- Daniel Brockman So really, we all have to ask ourselves: Am I waiting for RMS to do this? --TTN.