Issue #1392 has been updated by Jason Earl.


My trunk build is: ruby 1.9.2dev (2010-01-27 trunk 26434) [x86_64-linux]

Your clone code above doesn't leak either for me. 

However both of these simplified scenarios leak:

./ruby -e 'loop { Class.new.__send__ :include, Module.new }'
./ruby -e 'loop { Module.new.include Module.new }'

While I'm no C guru, I'm guessing the issue will be relating to include_class_new in class.c or at least it doesn't look like a garage collection issue given that your clone seems OK.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1392

----------------------------------------
http://redmine.ruby-lang.org