KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've recently come across the &method(:method_name) syntax. (This uses the Object#method method - RDoc link ) For example, [5, 7, 8, 1].each(&method(:puts)) is the equivalent of [5, 7, 8, 1].each{|number| puts number} Are there performance penalties for the latter compared to the former in the various implementations of Ruby? If so, are the implementors working on improving its performance?
Tags (comma-separated)
Save Edits
Cancel