Skip to content

Commit b91bac2

Browse files
committed
Define RubyParser::SyntaxError directly and drop require for ruby_parser.
Had to add a require of sexp since that came in indirectly via ruby_parser.
1 parent f31a040 commit b91bac2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/prism/translation/ruby_parser.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# frozen_string_literal: true
22
# :markup: markdown
33

4-
begin
5-
require "ruby_parser"
6-
rescue LoadError
7-
warn(%q{Error: Unable to load ruby_parser. Add `gem "ruby_parser"` to your Gemfile.})
8-
exit(1)
4+
require "sexp"
5+
6+
class RubyParser
7+
SyntaxError = Class.new RuntimeError
98
end
109

1110
module Prism

0 commit comments

Comments
 (0)