diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/prism/translation/ripper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/prism/translation/ripper.rb b/lib/prism/translation/ripper.rb index 0c81e37fe7..9999e9261f 100644 --- a/lib/prism/translation/ripper.rb +++ b/lib/prism/translation/ripper.rb @@ -646,8 +646,13 @@ module Prism bounds(node.call_operator_loc) call_operator = visit_token(node.call_operator) - bounds(node.message_loc) - message = visit_token(node.message) + message = + if node.message_loc.nil? + :call + else + bounds(node.message_loc) + visit_token(node.message) + end if node.name.end_with?("=") && !node.message.end_with?("=") && !node.arguments.nil? && node.block.nil? bounds(node.arguments.location) |
