Hi,

At Mon, 30 Aug 2004 17:46:18 +0900,
mark sparshatt wrote in [ruby-talk:110940]:
> x = MyClass.new
> x.foo = true
> p x.foo? #=> nil
> 
> The problem seems to be that the writer is setting the variable @foo but 
> the reader is reading the variable @foo?

class Module
  def attr_bool sym
    attr_accessor sym
    alias_method "#{sym}?", sym
    remove_method sym
  end
end

-- 
Nobu Nakada