Skip to content

Bug: xstr evaluated in incorrect binding #25

@numinit

Description

@numinit

Currently, xstr handing directly evaluates the xstr. Would there be a way to evaluate this like any other method in the context of the receiving object?

This would enable people to redefine the backtick method in the context of the receiver, which could be useful. I see that line 156 of sandbox.rb currently evaluates it directly, which ignores any overrides that could be present in the source binding.

I've taken a look through evalhook and it doesn't look like handle_xstr is passed the original receiver. Maybe something like the original_receiver object used in process_call could be used in process_(d)xstr? I'm not familiar with how the s-expressions are laid out, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions