[#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:19362] Re: lstripped here-document (Re: comments and continuing strings on the next line)

From: hmorita <hmorita@...>
Date: 2003-01-15 06:26:31 UTC
List: ruby-dev #19362
In "[ruby-dev:19360] Re: lstripped here-document (Re: comments and continuing strings on the next line)"
  on Wed, 15 Jan 2003 13:45:09 +0900
    "K.Kosako" <kosako@sofnec.co.jp> wrote:

| 行の先頭から何文字分をインデントとみなすかを、
| 数値で指定するのではどうでしょうか?
| 
| p <<-2EOS
|     foo
|       bar
| EOS

こういうのはどうでしょうか?

p <<EOS.gsub(/^ {2}/,'')
    foo
      bar
EOS

#=> "  foo\n    bar\n"

(個人的には、既存の機能で簡単に済ませられるものは、言語自体
がサポートしていなくてもよいように感じます。)

------
森田尚


In This Thread