Roland Tanglao
About

Ruby tip: no need to iterate over an array to print it, ruby does the right thing, just call puts

Jan 22, 2018

Pontifications

  • Simple ruby tip today following up from yesterday:
  • No need for:
q["content"].split(' ').each {|c| puts c}
  • because puts does the right thing, all you need to do is:
puts q["content"].split(' ')

Leave a comment on github

Roland Tanglao

  • Roland Tanglao
  • roland@rolandtanglao.com
  • rtanglao
  • rtanglao

flickr.com/roland, twitter.com/rtanglao #firefox #thunderbird