From: Timothy Goddard Date: 2006-07-31T15:25:04+09:00 Subject: Re: Calling a dynamically generated Ruby script from a .rb Robert La ferla wrote: > I have a Ruby script that dynamically generates a Ruby script. I would > like to execute the dynamically generated script from within my script. > I have some ideas but what's the best way to do this? Got example code? > This has to work in a cross-platform environment (Windows, Linux, Mac) > > -- > Posted via http://www.ruby-forum.com/. Why not just eval the generated code? code = "class A; def to_s; "B"; end; end" eval code puts A.new.to_s