Commit bb03d6b
committed
Fix
```console
echo '"#{Rails.root rescue "."}/config"' | rubocop --stdin bug.rb -d
An error occurred while Rails/FilePath cop was inspecting bug.rb:1:0.
undefined method `method?' for an instance of RuboCop::AST::RescueNode
lib/rubocop/cop/rails/file_path.rb:156:in `autocorrect_slash_after_rails_root_in_dstr'
lib/rubocop/cop/rails/file_path.rb:81:in `block in check_for_slash_after_rails_root_in_dstr'
```Rails/FilePath cop error with rescued Rails.root
1 parent 0bbd218 commit bb03d6b
File tree
3 files changed
+10
-0
lines changed- changelog
- lib/rubocop/cop/rails
- spec/rubocop/cop/rails
3 files changed
+10
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
409 | 417 | | |
410 | 418 | | |
0 commit comments