Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

as suggestion, regarding the following code:

Stuff.new().each do |item|

  puts item
end

In idiomatic ruby, we drop this parenthesis, so the code will look like Stuff.new.each ...



puts Stuff.new.map(&:to_s).join("\n")




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: