[#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:19271] Re: ruby-1.8.0 / yield(nil)とyield()のちがい

From: matz@... (Yukihiro Matsumoto)
Date: 2003-01-01 04:08:50 UTC
List: ruby-dev #19271
まつもと ゆきひろです

In message "[ruby-dev:19266] Re: ruby-1.8.0 / yield(nil)とyield()のちがい"
    on 03/01/01, Tanaka Akira <akr@m17n.org> writes:

|*a で受けると、
|
|> def f; yield; end; f {|*a| test_ok(a, [])}
|> def f; yield []; end; f {|*a| test_ok(a, [])}
|
|> def f; yield nil; end; f {|*a| test_ok(a, [nil])}
|> def f; yield [nil]; end; f {|*a| test_ok(a, [nil])}
|
|> def f; yield 1; end; f {|*a| test_ok(a, [1])}
|> def f; yield [1]; end; f {|*a| test_ok(a, [1])}
|
|のそれぞれが区別できないんでは?

これは「しょうがない」としました。これが区別できたことはない
し、これからも無理でしょう。というか、これも区別したいと思っ
ていろいろ画策しましたが、これを区別することを許すと

  *a = []

が[[]]になってしまい、互換性からも使い勝手からも望ましくない
と思ったので。ですから、完全に値を再現可能な形で受け渡しをす
るためには、全部配列で表現する(avalueと呼んでます)しかないと
思います。*aで受けるということはavalueを受け取るという意味で
すが、avalueと通常のyieldとの間でのラウンドトリップは成立し
ません。

|また、*a で渡すと、
|
|> def f; yield [[]]; end; f {|*a| test_ok(a, [[]])}
|> def f; yield *[[]]; end; f {|a| test_ok(a, [])}
|
|というように、
|
|> def f; yield [[]]; end; f {|a| test_ok(a, [[]])}
|
|という期待と異なってしまうのでは?

意味がよくわかりませんでした。

 def f; yield *[[]]; end; f {|a| test_ok(a, [[]])}

が期待されているということ?

In This Thread