Skip to content

Allow logical ops to begin on beginning of next line#9148

Merged
enebo merged 2 commits intojruby:10.1-devfrom
enebo:ops_on_bol
Dec 22, 2025
Merged

Allow logical ops to begin on beginning of next line#9148
enebo merged 2 commits intojruby:10.1-devfrom
enebo:ops_on_bol

Conversation

@enebo
Copy link
Copy Markdown
Member

@enebo enebo commented Dec 22, 2025

Logical binary operators (||, &&, and and or) at the beginning of a line continue the previous line, like fluent dot. The following two code are equal:

  if condition1
     && condition2
    ...
  end

  if condition1 && condition2
    ...
  end

[Feature #20925]

@enebo enebo added this to the JRuby 10.1.0.0 milestone Dec 22, 2025
@enebo enebo merged commit c1ba89d into jruby:10.1-dev Dec 22, 2025
77 checks passed
@enebo enebo deleted the ops_on_bol branch December 22, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant