You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
481 B
33 lines
481 B
# heredoc method call, other argument
|
|
puts <<~EOT.chomp
|
|
squiggly heredoc
|
|
EOT
|
|
|
|
puts <<ONE, __FILE__, __LINE__
|
|
content for heredoc one
|
|
ONE
|
|
|
|
# heredoc prevStyle == SCE_RB_GLOBAL
|
|
$stdout.puts <<~EOT.chomp
|
|
squiggly heredoc
|
|
EOT
|
|
|
|
# Issue #236: modifier if, unless, while and until
|
|
alias error puts
|
|
|
|
error <<EOF if true
|
|
heredoc if true
|
|
EOF
|
|
|
|
error <<EOF unless false
|
|
heredoc unless false
|
|
EOF
|
|
|
|
error <<EOF while false
|
|
heredoc while false
|
|
EOF
|
|
|
|
error <<EOF until true
|
|
heredoc until true
|
|
EOF
|