You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
For example, you might want to define both a length/size method that shares the same implementation (like Ruby's Array/String classes).
This seems like a pretty common pattern in Ruby – when browsing through the standard library docs, there are fair number of Alias for: ... floating around.
One idea is to support something like Ruby's alias_method syntax in the macro/DSL. Another approach is to add a #[ruby_alias = "..."] that could appear 0 to N times, similar to how #[ruby_name = "..."] works.
If we are doing this, I suspect option 2 is what we want, since it doesn't seem as common to want to define alias for Rust methods. (If anyone want to try implementing it, the commit to add #[ruby_name = "..."] is probably a good place to draw inspiration.)
The text was updated successfully, but these errors were encountered:
For example, you might want to define both a
length
/size
method that shares the same implementation (like Ruby'sArray
/String
classes).This seems like a pretty common pattern in Ruby – when browsing through the standard library docs, there are fair number of
Alias for: ...
floating around.One idea is to support something like Ruby's
alias_method
syntax in the macro/DSL. Another approach is to add a#[ruby_alias = "..."]
that could appear 0 to N times, similar to how#[ruby_name = "..."]
works.If we are doing this, I suspect option 2 is what we want, since it doesn't seem as common to want to define alias for Rust methods. (If anyone want to try implementing it, the commit to add
#[ruby_name = "..."]
is probably a good place to draw inspiration.)The text was updated successfully, but these errors were encountered: