Michael Neumann wrote:
> How about this?
> module Immutable
>    def self.included(klass)
>      class << klass
>        alias __old_new new
>        def new(*args, &blk)
>          __old_new(*args, &blk).freeze
>        end
>      end
>    end
> end

Wrong hook. new is a class method, so you'll want to extend, so def 
self.extended.

Regards
Stefan Rusterholz
-- 
Posted via http://www.ruby-forum.com/.