Skip to content

Commit

Permalink
rubysrc ast creation: fix double handled 'MemberAccess' case (joernio…
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier authored Nov 29, 2023
1 parent 4618ea7 commit cd74792
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ trait AstForStatementsCreator(implicit withSchemaValidation: ValidationMode) { t
private def astsForImplicitReturnStatement(node: RubyNode): List[Ast] = {
node match
case _: (ArrayLiteral | HashLiteral | StaticLiteral | BinaryExpression | UnaryExpression | SimpleIdentifier |
IfExpression | SimpleCall | MemberAccess) =>
IfExpression | SimpleCall) =>
astForReturnStatement(ReturnExpression(List(node))(node.span)) :: Nil
case node: SingleAssignment =>
astForSingleAssignment(node) :: List(astForReturnStatement(ReturnExpression(List(node.lhs))(node.span)))
Expand Down

0 comments on commit cd74792

Please sign in to comment.