From: Justin To Date: 2008-06-20T05:41:32+09:00 Subject: Class question class Box attr_reader :exceptions def initialize exceptions = Hash.new end def exceptions? if(!exceptions.empty?) puts "error" else puts "No exceptions found." end end end box = Box.new box.exceptions? This prints out the error: TEST.rb:11:in `exceptions?': undefined method `empty?' for nil:NilClass (NoMethodError) from TEST.rb:23 Why is my exceptions hash a NilClass?? Thanks!! -- Posted via http://www.ruby-forum.com/.