diff options
author | Kevin Newton <[email protected]> | 2024-05-13 12:31:47 -0400 |
---|---|---|
committer | git <[email protected]> | 2024-05-13 16:31:55 +0000 |
commit | b5e53e2f32e19e826eacbf9e2e301b1deae146df (patch) | |
tree | afa0ed9b9c8045170ccf9f4ffd97d21dc765cdd0 /lib/prism/translation/ruby_parser.rb | |
parent | 5931f857abf704c6fc62a93d2fc933b13950392d (diff) |
[ruby/prism] Rescue LoadError for ruby_parser as well
https://github.com/ruby/prism/commit/d4eb13e703
Diffstat (limited to 'lib/prism/translation/ruby_parser.rb')
-rw-r--r-- | lib/prism/translation/ruby_parser.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/prism/translation/ruby_parser.rb b/lib/prism/translation/ruby_parser.rb index d01a762a03..43aac23be7 100644 --- a/lib/prism/translation/ruby_parser.rb +++ b/lib/prism/translation/ruby_parser.rb @@ -1,6 +1,11 @@ # frozen_string_literal: true -require "ruby_parser" +begin + require "ruby_parser" +rescue LoadError + warn(%q{Error: Unable to load ruby_parser. Add `gem "ruby_parser"` to your Gemfile.}) + exit(1) +end module Prism module Translation |