tenderlove / recma

Pure ruby javascript parser and interpreter.
196 stars 58 forks source link

Can't Require for Ruby 2.2.1 #37

Open Ch4s3 opened 9 years ago

Ch4s3 commented 9 years ago

In pry I try require 'rkelly' and get the following:

SyntaxError: /Users/chase/.rvm/gems/ruby-2.2.1/gems/rkelly-1.0.7/lib/rkelly/visitors/evaluation_visitor.rb:318: invalid multibyte escape: /(\A[\s\xA0]*|[\s\xA0]*\Z)/
from /Users/chase/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
pcheah commented 7 years ago

Try adding the following line to the top of evaluation_visitor.rb:

# encoding: US-ASCII

See if that gets rid of the error.

I got it from: https://techoverflow.net/2013/12/29/solving-invalid-multibyte-escape-xfexff-in-ruby-vpim/?q=/blog/2013/12/29/solve-invalid-multibyte-escape-xfe-xff-in-ruby-vpim/