On Mar 15, 2007, at 11:46 PM, TRANS wrote: > One can > of course handle it manually, but the advantages of a general lib are, > of course, what you get "for free": a common interface, thread-safety > and no issues with hash keys. I see these points and they are certainly correct, but honestly the two or three times I've needed something like this it was trivial to just roll it in. In fact, I don't think I've ever needed a more complicated version than: class OnePerArgs class << self alias_method :__new__, :new def new(*args) (@instances ||= Hash.new)[args] ||= __new__(*args) end end end Even with all of these enhancements you speak of, your library is 36 lines of code. I guess I just feel this is a pretty simple problem to be solving with a standard library. I'm not saying I oppose adding it. I'm just not feeling a huge need. James Edward Gray II