Ruby-dev summary #17442-17540


(Masayoshi TAKAHASHI) #1

Hi all,

This is a summary of ruby-dev ML in these days.

---- ruby-dev #17442-17540 (2002-06-14 … 2002-06-21) ----

[ruby-dev:17513] END in literal

Nobu Nakada pointed out the difference between END
in “” and END in here document.

p <<EOS
__END__
EOS
#=> "__END__\n"

p "
__END__
"
#=> unterminated string meets end of file

But if it’s fixed, we cannot use END in <<’’ or <<``.
This problem is still open.

[ruby-dev:17421] broken string with unterminated “#{”.

In current ruby, “#{“abc”}” is parsed as ‘“abc”’, not
’"#{" abc “}”’. Is this behavior smart or bad?
Tanaka Akira claimed that the notation of string is
a kind of ‘control structure’ and it would come to be
better that we can write Ruby’s code in #{…} without
any escaping. Matz agreed with his opinion.

TAKAHASHI ‘Maki’ Masayoshi E-mail: maki@rubycolor.org


(Nobuyoshi Nakada) #2

Hi,

···

At Tue, 25 Jun 2002 06:42:18 +0900, TAKAHASHI Masayoshi wrote:

[ruby-dev:17513] END in literal

Nobu Nakada pointed out the difference between END
in “” and END in here document.

p <<EOS
__END__
EOS
#=> "__END__\n"

p "
__END__
"
#=> unterminated string meets end of file

But if it’s fixed, we cannot use END in <<’’ or <<``.
This problem is still open.

At last, ``, ‘’ and “” behaviors have changed to allow END
line in 1.7.


Nobu Nakada