bits about life, coding and stuff
Got an strange error:
What did I do? (…)Integer(somestring)(…) where somestring was something between 01-99.
Turns out that an leading zero tells ruby that this is octal. Hell, I don’t have any octal stuff in my web app.
Solution: Do it the ruby way, use .to_i – even cleaner, and no octal nonsense
(Why I posted this? Because I never got that error, only after hitting production mode, someone committed a 09. Pretty everything else is parseable, 00-07 is valid octal)
Related posts: