1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

parse.y: fix restored cmdarg_stack

* parse.y (brace_body, do_body): since cmdarg_stack is saved in
  VALUE val, should restore from the same member.  on big-endian
  platforms where VALUE is larger than int, it restored 0 in the
  upper word.  [ruby-core:77920] [Bug #12900]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-11-05 05:17:22 +00:00
parent 2da5ae4232
commit 8a5512b4bf
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Sat Nov 5 14:17:20 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (brace_body, do_body): since cmdarg_stack is saved in
VALUE val, should restore from the same member. on big-endian
platforms where VALUE is larger than int, it restored 0 in the
upper word. [ruby-core:77920] [Bug #12900]
Sat Nov 5 13:52:52 2016 Akinori MUSHA <knu@iDaemons.org>
* lib/shellwords.rb (Shellwords#shellsplit): Fix the handling of

View file

@ -3751,7 +3751,7 @@ brace_body : {$<vars>$ = dyna_push();}
{
$$ = new_brace_body($3, $4);
dyna_pop($<vars>1);
CMDARG_SET($<num>2);
CMDARG_SET($<val>2);
}
;
@ -3761,7 +3761,7 @@ do_body : {$<vars>$ = dyna_push();}
{
$$ = new_do_body($3, $4);
dyna_pop($<vars>1);
CMDARG_SET($<num>2);
CMDARG_SET($<val>2);
}
;