Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Array#last properly #368

Merged
merged 2 commits into from Feb 15, 2013
Merged

Implement Array#last properly #368

merged 2 commits into from Feb 15, 2013

Conversation

judofyr
Copy link
Contributor

@judofyr judofyr commented Feb 14, 2013

array/last_spec.rb passes now.

@classdef.method("last")
def method_last(self, space):
@classdef.method("last", count="int")
def method_last(self, space, count=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't translate, you can't mix ints and None in RPython, so you need to take w_count check for None and do the coercion yourself.

alex added a commit that referenced this pull request Feb 15, 2013
Implement Array#last properly
@alex alex merged commit 46ec03e into topazproject:master Feb 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants