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

[Truffle] Updates to Array#{map, map!}. #2714

Merged
merged 1 commit into from Mar 17, 2015

Conversation

bjfish
Copy link
Contributor

@bjfish bjfish commented Mar 17, 2015

No description provided.

toEnumNode = insert(DispatchHeadNodeFactory.createMethodCall(getContext()));
}

return toEnumNode.call(frame, array, "to_enum", null, getContext().getCoreLibrary().getMapBangSymbol());
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a very common pattern - maybe we should have an annotation on @CoreMethod called toEnumIfNoBlock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see 90 occurrences of returns an Enumerator in the spec/ruby directory so I agree it would probably make a good annotation. I think this should be a different PR though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah - do you want to take that on? If you look at the accessors of the other properties in @CoreMethod you should be able to find the code where they are inserted into the core method prelude.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chrisseaton yes, ill give it a try

@chrisseaton
Copy link
Contributor

We've got spec failures here but they look unrelated to your work. I'll try and fix them and then re-run the specs here later.

@bjfish
Copy link
Contributor Author

bjfish commented Mar 17, 2015

@chrisseaton extra lines removed

chrisseaton added a commit that referenced this pull request Mar 17, 2015
[Truffle] Updates to Array#{map, map!}.
@chrisseaton chrisseaton merged commit ef55159 into jruby:master Mar 17, 2015
@chrisseaton chrisseaton added this to the truffle-dev milestone Mar 17, 2015
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
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

3 participants