-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Ops.get_* shortcut methods
In code geenreated by Y2R, we often have pieces like this: Convert.to_string(Ops.get(l, 0, "foo")) This code is typically emitted because the original collection is untyped. Because this pattern appears over and over, we decided to simplify it to something like this: Ops.get_string(l, 0, "foo")) That is, introduce and use shortcut methods that would combine getting an item from a collection with type conversion. This commit adds needed shortcut methods to Ruby bindings. It will be followed by a commit in Y2R that will generate code which will use them.
- Loading branch information
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters