lib/rbst.rb in RbST-0.2.0 vs lib/rbst.rb in RbST-0.3.0

- old
+ new

@@ -1,6 +1,6 @@ -require 'open3' +# encoding: UTF-8 class RbST @@executable_path = File.expand_path(File.join(File.dirname(__FILE__), "rst2parts")) @@executables = { @@ -80,14 +80,14 @@ protected def execute(command) output = '' - Open3::popen3(command) do |stdin, stdout, stderr| - stdin.puts @target - stdin.close - output = stdout.read.strip + IO.popen(command, "w+") do |f| + f.puts @target + f.close_write + output = f.read end output end def convert_options @@ -104,6 +104,6 @@ opt.inject('') do |string, (flag, val)| flag = flag.to_s.gsub(/_/, '-') string + (flag.length == 1 ? " -#{flag} #{val}" : " --#{flag}=#{val}") end end -end \ No newline at end of file +end