Re: Camping::Apps returns!

2008-08-29 Thread Magnus Holm
That's why I have monkey-patched it: Apps = [].instance_eval do def (i) delete_if { |f| f.to_s == i.to_s} super end self end Ex1 = Class.new Apps Ex1 # = [Ex1] Object.send(:remove_const, :Ex1) Ex1 = Class.new Apps Ex1 # = [Ex1] # the old one has been deleted. Yes, I realize we

Camping::Apps returns!

2008-08-28 Thread Magnus Holm
Camping::Apps is back! I don't know the *exact* reason it was being removed, but now it's a monkey-patched array which at least doesn't leak memory when using together with the reloader (were there more problems with this?). I really think we need this, since there's no guaranty that only

Re: Camping::Apps returns!

2008-08-28 Thread zimbatm
Hi Magnus, If I remember well, I am the one who introduced AND removed Camping::Apps. I'm not sure anymore but I think it wasn't really used and that solutions never really satisfied me. Do you have any use for it ? Cheers, zimbatm ___ Camping-list

Re: Camping::Apps returns!

2008-08-28 Thread Magnus Holm
Well, it's being used in mab.rb and ar.rb: Old way: Object.constants.map{|c|Object.const_get(c)}.each do |c| c::Models.module_eval $AR_EXTRAS if c.respond_to?(:goes) end New way: Camping::Apps.each do |c| c::Models.module_eval $AR_EXTRAS end Which may break if you got another class/module

Re: Camping::Apps returns!

2008-08-28 Thread Aria Stewart
On Aug 28, 2008, at 1:54 PM, zimbatm wrote: Hi Magnus, If I remember well, I am the one who introduced AND removed Camping::Apps. I'm not sure anymore but I think it wasn't really used and that solutions never really satisfied me. Do you have any use for it ? I most certainly do. In