Brainf**k to Ruby converter, written in Ruby -- v1.0
You should open the input file before the output file, so that if the input file is unreadable, no file is created at all.  File opening should be done using blocks for automatic closure and cleanup.

This is too complicated:


replacements.each do |data|
  if data[:replacing] == char
    output.puts(data[:replacement])
  end
end



replacements would be better as a Hash:

replacements = {
    '+' =&gt; 'data[pointer] += 1',
    '-' =&gt; 'data[pointer] -= 1',
    '&gt;' =&gt; 'pointer += 1',
    '&lt;' =&gt; 'pointer -= 1',
    '.' =&gt; 'putc data[pointer]',
    ',' =&gt; 'data[pointer] = $stdin.readbyte',
    '[' =&gt; 'until data[pointer] == 0',
    ']' =&gt; 'end',
}

open(input_file, File::RDONLY) do |input|
  open(output_file, File::CREAT | File::WRONLY) do |output|
    output.puts(start)
    output.puts(input.each_char.map { |c| replacements[c] }.compact.join("\n"))
  end
end


One big puts should be faster than many indivual puts.