Project

General

Profile

Actions

Feature #6095

closed

Question about block parameter syntax

Added by ko1 (Koichi Sasada) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:45290]

Description

 ささだです.

1.times{
|
x,
y|
}

は通りますが,

1.times{
|
x,
y
|
}

は通りません.閉じる | が行頭に来るのがまずいようです.これは,そういう
もんでしょうか.下記のように,ブロックパラメータにコメント入れようと思っ
て気づきました.

1.times{
|
x, # xxx
y # yyy
| # <- syntax error, unexpected '\n', expecting '|'
}

--
// SASADA Koichi at atdot dot net

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0