From 41066ad0b75cf568879d42f574b05edaa2600691 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Aug 2006 03:28:58 +0000 Subject: [PATCH] * 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 --- ChangeLog | 10 +++++++--- parse.y | 8 ++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05e38b9c19..236bfe05dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 8 12:28:43 2006 Nobuyoshi Nakada + + * parse.y (arg): allow newlines before ternary colon. [ruby-dev:29189] + Mon Aug 7 17:56:59 2006 Yukihiro Matsumoto * ext/bigdecimal/bigdecimal.c, ext/digest/rmd160/rmd160ossl.c, @@ -19,7 +23,7 @@ Mon Aug 7 14:37:48 2006 Yukihiro Matsumoto Mon Aug 7 12:05:28 2006 Yukihiro Matsumoto - * dln.c, eval.c, gc.c, ruby.h: shut up AIX alloca warning. + * dln.c, eval.c, gc.c, ruby.h: shut up AIX alloca warning. a patch from Yutaka Kanemoto . [ruby-dev:29191] @@ -67,10 +71,10 @@ Fri Aug 4 12:13:22 2006 Eric Hodel * lib/drb/ssl.rb: Close socket on SSLError [ruby-core:7197] Fri Aug 4 18:59:49 2006 Keiju Ishitsuka - + * lib/irb/{init.rb,ruby-lex.rb,slex.rb}: can't input '\c' for [ruby-core: 7122]. and support for ruby1.8.X - + Fri Aug 4 14:02:14 2006 * lib/date/format.rb (__strptime, strftime): allow multi-line patterns 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); /*%