diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | parse.y | 2 | ||||
| -rw-r--r-- | test/ruby/test_case.rb | 7 |
3 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Nov 5 12:06:35 2009 NARUSE, Yui <naruse@ruby-lang.org> + + * parse.y (args): use splat_array. + fix: when *foo doesn't splat. [ruby-list:46517] + Thu Nov 5 11:31:23 2009 NAKAMURA Usaku <usa@ruby-lang.org> * win32/win32.c (CreateChild): allocate temporary buffer and use it @@ -1455,7 +1455,7 @@ args : arg_value | tSTAR arg_value { /*%%%*/ - $$ = NEW_TO_ARY($2); + $$ = splat_array($2); /*% $$ = arg_add_star(arg_new(), $2); %*/ diff --git a/test/ruby/test_case.rb b/test/ruby/test_case.rb index 41a22038a0..af925d1ac8 100644 --- a/test/ruby/test_case.rb +++ b/test/ruby/test_case.rb @@ -45,5 +45,12 @@ class TestCase < Test::Unit::TestCase else assert(false) end + + case "+" + when *%w/. +/ + assert(true) + else + assert(false) + end end end |
