Skip to content

&self and &Ruby #160

@ankane

Description

@ankane

Hi, I have a small API suggestion for using &self with &Ruby to make things more consistent.

Methods without &Ruby can use:

pub fn hello(&self, ...)

but methods with &Ruby need to use:

pub fn hello(ruby: &Ruby, self_: &Self, ...)

(and use self_ instead of self in the method body)

It'd be nice if there was support for:

pub fn hello(&self, ruby: &Ruby, ...)

like PyO3:

pub fn hello(&self, py: Python<'_>, ...)

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