observed_classes is [].
I replied earlier, but the google post forum seems to
went some wrong, so makes my post unsuccesful.
Sorry for that.

On 11月26日, 下午4时50分, "Jeffrey L. Taylor" <r...@abluz.dyndns.org> wrote:
> Quoting femto <femto...@gmail.com>:
>
>
>
>
>
> > Hello all, while I'm using acts_as_audited(on jruby platform),
> > after vendored the acts_as_audited, it reports some error,
> > line 167,
> > # Start observing the declared classes and their subclasses.
> >    def initialize
>
> >      Set.new(observed_classes + observed_subclasses).each { |klass|
> > add_observer! klass } #this line
> >    end
> > after some trace shows this one, when observed_classes is empty, will
> > return 0(Fixnum) causes the
> > above line to report error,
>
> > def observed_subclasses
> >        observed_classes.sum([]) { |klass| klass.send(:subclasses) }
> > end
>
> > so I changed it to this:
>
> > def observed_subclasses
> >        #observed_classes.sum([]) { |klass| klass.send(:subclasses) }
> >        result = []
> >        observed_classes.each do |klass|
> >           result += klass.send(:subclasses)
> >        end
>
> >      end
> > It this a bug?
>
> What is definition of observed_classes?  When there are no observed classes,
> does it return [] or nil?
>
> Jeffrey

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to