Hacker News new | past | comments | ask | show | jobs | submit login

Seems roughly appropriate (thinking in zero-values):

  nil.to_i => 0
  nil.to_s => ""
  nil.to_a => []
  nil.to_h => {}
  nil.to_set # error; nil.to_a.to_set => #<Set: {}>



Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: