diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-05 03:11:27 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-05 03:11:27 +0000 |
| commit | b7d63cbb85e028ab919fa581aee2a748a5f994ab (patch) | |
| tree | e12c0d1fb593db21a77825b9c55565c9ca6513e1 | |
| parent | 8b304b1bd2ca15021f1d1b63714f0b2061241d96 (diff) | |
* parse.y (args): use splat_array.
fix: when *foo doesn't splat. [ruby-list:46517]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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 |
