Project

General

Profile

Feature #4513

allow whitespace following EOL continuation backslash

Added by Rich Morin over 5 years ago. Updated over 3 years ago.

Status:
Assigned
Priority:
Normal
[ruby-core:<unknown>]

Description

=begin
In a few programming languages, the displayed or printed program can hide
critical syntactic and/or semantic information. For example, in make(1)
and Python, the difference between initial tabs and spaces can cause bugs
that are not visually apparent.

Ruby has a minor instance of this problem, in that spaces or tabs
between a backslash and the EOL will prevent the line from being continued:

a \
?> = 2
=> 2
b \
SyntaxError: compile error
(irb):3: syntax error, unexpected $undefined, expecting $end
from (irb):3

Could Ruby open up its syntax to allow any number of intervening spaces or tabs before the EOL?
=end

History

#1 [ruby-core:43441] Updated by Hiroshi Nakamura over 4 years ago

  • Description updated (diff)
  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to Nobuyoshi Nakada

Regardless it's acceptable or not, we want to check nobu's local patches first. Don't you have that?

#2 [ruby-core:49706] Updated by Yusuke Endoh almost 4 years ago

  • Target version set to next minor

#3 [ruby-core:51137] Updated by Nobuyoshi Nakada over 3 years ago

  • Priority changed from Normal to 3

It is easy to change, but I doubt if it is useful.

Also available in: Atom PDF