From: x1 Date: 2006-07-29T09:38:16+09:00 Subject: Re: Calling a dynamically generated Ruby script from a .rb On windows: C:\>echo class Fruit > module.rb C:\>echo def orange(taste) >> module.rb C:\>echo return "oranges tates " + taste.to_s >> module.rb C:\>echo end >> module.rb C:\>echo end >> module.rb C:\>irb irb(main):002:0> load 'module.rb' => true irb(main):003:0> puts Fruit.new.orange("sweet!") oranges tates sweet! => nil irb(main):004:0> On 7/28/06, Matt Todd wrote: > Also, another option could be to call... > > system "ruby #{name}" > > (where name is a trusted name (including .rb) and isn't potentially > dangerous user-input data). > > Another option is to look at _Why the Lucky Stiff's Sandbox (freaky > freaky snadbox, its endearing title) for something a bit more secure > for when you do need to deal with input from the user. > > Hope this helps as well. > > M.T. > >