summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-08 03:28:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-08 03:28:58 +0000
commit41066ad0b75cf568879d42f574b05edaa2600691 (patch)
tree110e90d3dfed74f34fc4f85b43ae03ad09f38707 /parse.y
parent0c724c2734a079513776b541fa4979bd6ba7b4ad (diff)
* parse.y (arg): allow newlines before ternary colon. [ruby-dev:29189]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index e0b82f8dfb..7139ee6b42 100644
--- a/parse.y
+++ b/parse.y
@@ -2094,13 +2094,13 @@ arg : lhs '=' arg
$$ = dispatch1(defined, $4);
%*/
}
- | arg '?' arg ':' arg
+ | arg '?' arg opt_nl ':' arg
{
/*%%%*/
- $$ = NEW_IF(cond($1), $3, $5);
+ $$ = NEW_IF(cond($1), $3, $6);
fixpos($$, $1);
/*%
- $$ = dispatch3(ifop, $1, $3, $5);
+ $$ = dispatch3(ifop, $1, $3, $6);
%*/
}
| primary
@@ -2163,7 +2163,7 @@ opt_call_args : none
call_args : command
{
- rb_warn("parenthesize argument(s) for future version");
+ rb_warn("parenthesize argument(s) for future version");
/*%%%*/
$$ = NEW_LIST($1);
/*%