Skip to content

Handle properly stringifying multiline calls #15691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Blacksmoke16
Copy link
Member

Previously code like:

{%
  vals = [4, 1, 12]
    .sort_by do |v| v end
    .map do |v| v end
%}

{%
  vals = "foo"
    .strip
    .strip.strip
%}

Would always be stringified as:

{%
  vals = [4, 1, 12].sort_by do |v| v end.map do |v| v end
%}

{%
  vals = "foo".strip.strip.strip
%}

With this PR it now remains unchanged.

@straight-shoota straight-shoota added this to the 1.17.0 milestone Apr 22, 2025
@straight-shoota straight-shoota merged commit 87a26e3 into crystal-lang:master Apr 24, 2025
36 checks passed
@Blacksmoke16 Blacksmoke16 deleted the multiline-call-string-representation branch April 25, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants