Skip to content

Calls from default argument values show inconsistent caller information #57

@dylanahsmith

Description

@dylanahsmith

For example, if we have a method defined with

def create_applied_discount_from(discount, code: discount.try(:code))

the discount.try(:code) call shows that line in the file path and line number for the call, but the entity and method name refer to the caller of create_applied_discount_from which is inconsistent with the file path. Ideally, for the discount.try(:code) call, the caller method would show up as create_applied_discount_from and the caller entity would be the class of the object that method was called on.

This is happening because rotoscope tries to keep information from the stack based by pushing a frame to this stack on call events and popping a stack from on a return event. However, in this case the call event hasn't happened yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions