pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/jruby/jruby/pull/9355/files

href="https://github.githubassets.com/assets/primer-primitives-10bf9dd67e3d70bd.css" /> Propagate newline from if to bodies by headius · Pull Request #9355 · jruby/jruby · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/src/main/java/org/jruby/parser/RubyParserBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,14 @@ public void fixpos(Node node, Node orig) {
if (node == null || orig == null) return;

node.setLine(orig.getLine());

// Detect IfNode and propagate newline to the bodies.
// This is a bit of a form-fitted fix, but the full reduce_nodes logic from CRuby
// defied an initial porting attempt. See jruby/jruby#9293.
if (node.isNewline() && node instanceof IfNode ifNode) {
if (ifNode.getThenBody() instanceof Node thenNode) thenNode.setNewline();
if (ifNode.getElseBody() instanceof Node elseNode) elseNode.setNewline();
}
}

public Node new_fcall(ByteList operation) {
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

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