diff options
author | Jeremy Evans <[email protected]> | 2024-01-10 13:07:34 -0800 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2024-01-10 16:02:38 -0800 |
commit | ef751252711ca7ecabb3e4ad9214fa0d1d63608a (patch) | |
tree | d9c62a3c8ca06c2b9c983b7b49e24ee6d849ac60 /compile.c | |
parent | 25f5b83689fc6dd137d45b634a0cd6e8bd024728 (diff) |
Make defined? for op asgn expressions to constants use "assignment"
Previously, it used "expression", as that was the default. However,
op asgn expressions to constants use the NODE_OP_CDECL, so recognize
that node type as assignement.
Fixes [Bug #20111]
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -5951,6 +5951,7 @@ defined_expr0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, case NODE_IASGN: case NODE_CDECL: case NODE_CVASGN: + case NODE_OP_CDECL: expr_type = DEFINED_ASGN; break; } |