mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y: avoid SEGV at OP_ASIGN to pseudo variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aac5ff0031
commit
9ae27073fa
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Feb 14 17:38:35 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||
|
||||
* parse.y: avoid SEGV at OP_ASIGN to pseudo variable.
|
||||
|
||||
Thu Feb 14 14:13:16 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* struct.c (Init_Struct): should undefine "allocate" for Struct
|
||||
|
|
4
parse.y
4
parse.y
|
@ -427,8 +427,8 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
|
|||
}
|
||||
| var_lhs tOP_ASGN command_call
|
||||
{
|
||||
ID vid = $1->nd_vid;
|
||||
if ($1) {
|
||||
ID vid = $1->nd_vid;
|
||||
if ($2 == tOROP) {
|
||||
$1->nd_value = $3;
|
||||
$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
|
||||
|
@ -772,8 +772,8 @@ arg : lhs '=' arg
|
|||
}
|
||||
| var_lhs tOP_ASGN arg
|
||||
{
|
||||
ID vid = $1->nd_vid;
|
||||
if ($1) {
|
||||
ID vid = $1->nd_vid;
|
||||
if ($2 == tOROP) {
|
||||
$1->nd_value = $3;
|
||||
$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
|
||||
|
|
Loading…
Reference in a new issue