From: Intransition Date: 2011-07-06T00:18:57+09:00 Subject: Re: Define a constant in dynamically defined class On Jul 5, 10:45 am, Mike Bethany wrote: > You could do this: > > k = Class.new do >   class_eval("class X; end") > end > > puts k::X.object_id > Thanks, but unfortunately that only works b/c it's evaluating a string and not a block. I tried this thinking it should do the trick: Class.new do   instance_eval(&block) end But no go :-(