From: Clifford Heath Date: 2007-03-19T19:00:07+09:00 Subject: Re: attr_accessor David A. Black wrote: > I think there's a problem with array_attr; I'm getting: > /opt/local/lib/ruby/gems/1.8/gems/chattr-0.9.0/lib/chattr.rb:378:in > `throw': wrong number of arguments (0 for 1) (ArgumentError) > when I try to violate the constraint on an array. It looks like > there's a throw just kind of sitting there on its own. My bad. I was using throw when I thought I was using raise. Subversion has the right code now, and I'll upload the 0.9.1 gem shortly. Apparently I hadn't tested that path. With regard to typed_attr, there are still ways to violate the constraints: use a default value that isn't allowed (or not use one where nil isn't allowed), or directly assign to the member variable from a member function. There's no good way of avoiding that really though... Clifford Heath.