On Fri, Jan 27, 2012 at 12:20:08PM +0900, Josh Cheek wrote:
>
> It's incredibly rare to need to resort to string evaluation. This example
> can be rewritten as:
> 
> bar = "Hello" + "World"
> 
> klass = Class.new do
>   def initialize(name='World')
>     @name = name
>   end
> 
>   def greet
>     return "Hello, #{@name}"
>   end
> end
> 
> Object.const_set bar, klass

You're right, that's much better -- apart from the fact I have yet to
come up with a single good reason for dynamic class names.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]