diff --git a/ChangeLog b/ChangeLog index d127a2d650..db3f51a618 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 29 15:12:43 2008 Nobuyoshi Nakada + + * parse.y (opt_block_param): command can start just after block param + definition. [ruby-list:44479] + Fri Feb 29 03:22:19 2008 NARUSE, Yui * test/ruby/test_time.rb (test_readers): fix typo. diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index c438231f2c..6aedfbb6e5 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -44,8 +44,6 @@ assert_equal 'ok', %q{ end }, '[ruby-core:14537]' -assert_valid_syntax('1.times {|i|print (42),1;}', '[ruby-list:44479]') - assert_normal_exit %q{ "abc".gsub(/./, "a" => "z") } diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index c64bd5ad9c..dc4cae3dff 100644 --- a/bootstraptest/test_syntax.rb +++ b/bootstraptest/test_syntax.rb @@ -765,3 +765,5 @@ assert_equal "1\n2\n", %q{ next p(i) end } + +assert_valid_syntax('1.times {|i|print (42),1;}', '[ruby-list:44479]') diff --git a/parse.y b/parse.y index 6a8375d04e..bf0cd7388f 100644 --- a/parse.y +++ b/parse.y @@ -3197,6 +3197,9 @@ block_param : f_arg ',' f_rest_arg opt_f_block_arg opt_block_param : none | block_param_def + { + command_start = Qtrue; + } ; block_param_def : '|' opt_bv_decl '|'