From: Haze Noc Date: 2007-08-19T03:34:46+09:00 Subject: Re: Execute ruby commands in a program Sorry its quite hard to explain, Its not IRB, because i want to actually run a command from within another ruby script.. Lets say i wanted to do a 1 liner from within the program i could do something like.. me: ruby puts "Hello" script runs `ruby -e "puts 'Hello'" Program: Hello But i didn't really want to do any 1 liners, althouth if i did, lets say i have while msg = gets if msg =~ /^ruby (.+)/i msg.gsub!(/\"/, "'") message = `ruby -e "#{$1}"` puts message end end and input was.. puts 'hello' How could i return the input? -- Posted via http://www.ruby-forum.com/.