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 could make some changes in camping/reloader.rb,
but I think this is more intuitive and do got lot's of spare bytes...
On Fri, Aug 29, 2008 at 2:28 AM, zimbatm <[EMAIL PROTECTED]> wrote:
> Now I remember, there is a quirk. Make sure to remove the old app in
> the array when reloading the app in the Camping::Reloader.
>
> Cheers,
> zimbatm
> _______________________________________________
> Camping-list mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/camping-list
>
--
Magnus Holm
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list