Skip to content

Layout/LineLength can fold code inside a heredoc #13343

@stdedos

Description

@stdedos
str = <<-HTML.strip_heredoc.strip_heredoc.strip_heredoc.encode!('utf-8', invalid: :replace, replace: '').strip.force_encoding('binary')
  <html>
  </html>
HTML

Expected behavior

idk

Actual behavior

Describe here what actually happened.
Please use rubocop --debug when pasting rubocop output as it contains additional information.

str = <<-HTML.strip_heredoc.strip_heredoc.strip_heredoc.encode!('utf-8', invalid: :replace, 
replace: '').strip.force_encoding('binary')
  <html>
  </html>
HTML

Steps to reproduce the problem

This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.

RuboCop version

$ bin/bundle exec rubocop -V
1.67.0 (using Parser 3.3.5.0, rubocop-ast 1.32.3, analyzing as Ruby 2.7, running on jruby 3.1.4) [java]
  - rubocop-performance 1.22.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy