Cubist Pharmaceuticals shares leap late after ruling on patent cases