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

His solutions works while your does not. I ran them both in irb. This is because "string << integer" does not do what you think it does. It treats the integer as character code.

  "" << 0x41 # => "A"



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

Search: