Socket and ruby