On Feb 20, 3:38 am, Tiago Pinto <thpi... / gmail.com> wrote:
>
> What do you think? There's a way to do this? Is this just a silly question?
>
> I know, we should be working, but we both love Ruby.

Everybody replied already, still I think left-shift deserves
mentioning:

"127.0.0.1".split('.').inject(0) { |s,x| (s << 8) + x.to_i }
=> 2130706433

--
Cheers,
Alex