A federal judge in Brooklyn ruled yesterday that New York City 's lawsuit against gun manufacturers and distributors can go forward , despite new federal legislation devised to protect gun makers from such lawsuits .