The answer is: Jail for narcotic addiction
Narcotic addicts would most likely experience excruciating pain during withdrawal, which is why it is important for them to get proper care in the hands of health professionals.
Because of this Putting them in jail would be similar to physical torture since they would not get access to those needed professionals.. This became the basis of the ruling.