Hacker News new | ask | show | jobs
by tptacek 5556 days ago
Not comparable. h() was a one-sized-fits-all problem to quoting things that could occur anywhere in an HTML DOM. #to_i assures that a bit of syntax that can only ever accept integers is in fact given a real integer.

In case we're misunderstanding each other, I'm also saying that the framework should be doing that, not the caller (as was the case with h()).

1 comments

Thanks, yes misunderstanding: agree should be a framework protection not something developer should be sprinkling over code.