[#19261] lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@...

なかだです。

29 messages 2003/01/01
[#19360] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "K.Kosako" <kosako@...> 2003/01/15

nobu.nakada@nifty.ne.jpさんの

[#19361] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/15

なひです。

[#19364] Re: lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@... 2003/01/17

なかだです。

[#19366] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/17

なひです。

[#19299] [BUG] errno == 0 — Kazuhiro Yoshida <moriq@...>

もりきゅうです。win32だけかもしれません。

22 messages 2003/01/04
[#19301] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19302] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19303] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19304] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19306] Re: [BUG] errno == 0 — nobu.nakada@... 2003/01/05

なかだです。

[ruby-dev:19378] Re: lstripped here-document (Re: comments and continuing strings on the next line)

From: "K.Kosako" <kosako@...>
Date: 2003-01-18 02:21:35 UTC
List: ruby-dev #19378
hmoritaさんの<20030115152950p+wE%M@ohmsha.co.jp>から
> | 行の先頭から何文字分をインデントとみなすかを、
> | 数値で指定するのではどうでしょうか?
> | 
> | p <<-2EOS
> |     foo
> |       bar
> | EOS
> 
> こういうのはどうでしょうか?
> 
> p <<EOS.gsub(/^ {2}/,'')
>     foo
>       bar
> EOS

式展開の結果が置き換わる可能性がある、という違い以外にも、
何度も呼ばれるような場合には、実行効率上の差がありますね。

なので、適切なsyntaxが見つかれば、言語でサポートしても良いかもしれません。
(今は、中田さんの最初の仕様で良いような気がしています)
--
小迫@ソフネック   渋谷区恵比寿1-15-1

In This Thread