title: Running s-expressions from File
body: <p>I have a sexp in a file and i want to read in and then run it in ruby. Whenever I try to run it, it tells me SexpTypeError,  </p>
  
  <blockquote>
    <p>exp must be a Sexp, was String:</p>
  </blockquote>
  
  <p>Is there a way to run the <code>Sexp</code> from file? </p>
  
  <p>I am using the <code>ruby2ruby gem</code> and <code>ruby_parser</code> gems.</p>
  
  <p>I've tried on Windows 10, ruby 2.6.  I've tried parsing it after reading it, but it replicates the s-expression that i have in file which does not work.</p>
  
  <pre><code>    ruby      = "def a\n  puts 'A'\nend\n\ndef b\n  a\nend\na"
      parser    = RubyParser.new
      ruby2ruby = Ruby2Ruby.new
      sexp      = parser.process(ruby)
      from_file =nil
  
      File.open('jkl', 'wb')do |file|
          file.write(sexp)
      end
      File.open('jkl', 'rb') do |fp|
         from_file = fp.read()
      end
      eval ruby2ruby.process(from_file) 
  </code></pre>
  
  <p>I would like for the code to run giving the output "A"</p>