You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Flog on a project that uses Ruby Pattern Matching, I get the following error:
bkuhlmann@vilya rubysmith alchemists.io ⑂ release + flog
ERROR: parsing ruby file ./lib/rubysmith/cli/shell.rb
ERROR! Aborting. You may want to run with --continue.
Traceback (most recent call last):
23: from /Users/bkuhlmann/.gem/ruby/2.7.2/bin/flog:23:in `<main>'
22: from /Users/bkuhlmann/.gem/ruby/2.7.2/bin/flog:23:in `load'
21: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/bin/flog:5:in `<top (required)>'
20: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/lib/flog_cli.rb:28:in `run'
19: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/lib/flog_cli.rb:162:in `flog'
18: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/lib/flog.rb:177:in `flog'
17: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/lib/flog.rb:177:in `each'
16: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/lib/flog.rb:182:in `block in flog'
15: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/lib/flog.rb:194:in `flog_ruby'
14: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/flog-4.6.4/lib/flog.rb:224:in `flog_ruby!'
13: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/ruby_parser-3.15.0/lib/ruby_parser.rb:33:in `process'
12: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/ruby_parser-3.15.0/lib/ruby_parser.rb:33:in `each'
11: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/ruby_parser-3.15.0/lib/ruby_parser.rb:36:in `block in process'
10: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/ruby_parser-3.15.0/lib/ruby_parser_extras.rb:1317:in `process'
9: from /Users/bkuhlmann/.rubies/ruby-2.7.2/lib/ruby/2.7.0/timeout.rb:110:in `timeout'
8: from /Users/bkuhlmann/.rubies/ruby-2.7.2/lib/ruby/2.7.0/timeout.rb:33:in `catch'
7: from /Users/bkuhlmann/.rubies/ruby-2.7.2/lib/ruby/2.7.0/timeout.rb:33:in `catch'
6: from /Users/bkuhlmann/.rubies/ruby-2.7.2/lib/ruby/2.7.0/timeout.rb:33:in `block in catch'
5: from /Users/bkuhlmann/.rubies/ruby-2.7.2/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
4: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/ruby_parser-3.15.0/lib/ruby_parser_extras.rb:1329:in `block in process'
3: from (eval):3:in `do_parse'
2: from (eval):3:in `_racc_do_parse_c'
1: from /Users/bkuhlmann/.gem/ruby/2.7.2/gems/ruby_parser-3.15.0/lib/ruby_parser_extras.rb:1304:in `on_error'
/Users/bkuhlmann/.gem/ruby/2.7.2/gems/racc-1.5.1/lib/racc/parser.rb:538:in `on_error': ./lib/rubysmith/cli/shell.rb:27 :: parse error on value ["in", 27] (kIN) (Racc::ParseError)
Steps to Recreate
To recreate, I'm using Flog to illustrate since Flog has Racc as a dependency. Save the following to snippet.rb and run as ruby snippet.rb to see the issue:
The text was updated successfully, but these errors were encountered:
bkuhlmann
changed the title
Fix Racc::ParseError so Ruby Pattern Matching is supported
Fix Racc::ParseError so Pattern Matching is supported
Dec 12, 2020
Overview
When using Flog on a project that uses Ruby Pattern Matching, I get the following error:
Steps to Recreate
To recreate, I'm using Flog to illustrate since Flog has Racc as a dependency. Save the following to
snippet.rb
and run asruby snippet.rb
to see the issue:Desired Behavior
Would like to see Racc handle pattern matching without error.
Environment
The text was updated successfully, but these errors were encountered: