From: Peter Szinek Date: 2007-11-09T19:00:11+09:00 Subject: Re: singleton is this easy? Thufir wrote: > Is this all that's required to ensure that there's ever only one > instance of an ArrayOfCreatures? Seems too easy! You can also use the standard Ruby singleton implementation: ============================================================= require 'singleton' class SavageCrystalDragon include Singleton end scd = SavageCrystalDragon.instance ============================================================= If you would try to scd.dup: can't dup instance of singleton SavageCrystalDragon (TypeError) HTH, Peter ___ http://www.rubyrailways.com http://scrubyt.org