[Alexandria-list] New bug... sorry
LJD
registrations at liamjdavison.info
Tue May 31 16:27:43 EDT 2005
Worked it out, although I don't understand quite what this means.
I commented out your
alias_method :old_select, :select
def select
filtered_library = Library.new(@name)
self.each do |book|
filtered_library << book if yield(book)
end
return filtered_library
end
method in alexandria/library.rb and everything went back to normal. I
don't understand enough ruby - I guess alias_method a way of overriding
the default select method of the Array class? If so, what's wrong with
select returning an array?
I'm curious!
Gonna have to clean up my code before my version drifts too far from
CVS.
Liam
More information about the Alexandria-list
mailing list