From 2656b0545eaa3a5d8d2b96788adc2c1f4e78a1e0 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 29 Aug 2007 03:48:19 +0000 Subject: * parse.y (aref_args): args may not be a list. [ruby-dev:31592] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ bootstraptest/test_knownbug.rb | 30 ++++++++++++++---------------- bootstraptest/test_literal.rb | 2 ++ parse.y | 2 +- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index b5095014fd..3fd370de9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Aug 29 12:48:17 2007 Nobuyoshi Nakada + + * parse.y (aref_args): args may not be a list. [ruby-dev:31592] + Wed Aug 29 11:30:10 2007 Tanaka Akira * include/ruby/st.h (struct st_table): add entries_packed 1-bit diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 94b928127f..80de543edd 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -1,16 +1,14 @@ -# -# This test file concludes tests which point out known bugs. -# So all tests will cause failure. -# - -# massign -assert_equal '[0,1,{2=>3}]', '[0,*[1],2=>3]', "[ruby-dev:31592]" - -assert_equal 'ok', %q{ - def m() - yield :ng - end - r = :ok - m {|(r)|} - r -}, '[ruby-dev:31507]' +# +# This test file concludes tests which point out known bugs. +# So all tests will cause failure. +# + +# massign +assert_equal 'ok', %q{ + def m() + yield :ng + end + r = :ok + m {|(r)|} + r +}, '[ruby-dev:31507]' diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb index 76963962b4..2efd415429 100644 --- a/bootstraptest/test_literal.rb +++ b/bootstraptest/test_literal.rb @@ -115,6 +115,8 @@ assert_equal '5', 'a = [1,2,3]; a[1] = 5; a[1]' assert_equal 'bar', '[*:foo];:bar' assert_equal '[1, 2]', 'def nil.to_splat; [2]; end; [1, *nil]' assert_equal '[1, 2]', 'def nil.to_splat; [1, 2]; end; [*nil]' +assert_equal '[0, 1, {2=>3}]', '[0, *[1], 2=>3]', "[ruby-dev:31592]" + # hash assert_equal 'Hash', '{}.class' diff --git a/parse.y b/parse.y index 14d7b27f52..08c4268e27 100644 --- a/parse.y +++ b/parse.y @@ -2239,7 +2239,7 @@ aref_args : none | args ',' assocs trailer { /*%%%*/ - $$ = list_append($1, NEW_HASH($3)); + $$ = arg_append($1, NEW_HASH($3)); /*% $$ = arg_add_assocs($1, $3); %*/ -- cgit v1.2.3