The Ayatollah Ali Khameini answers your questions with regard to Ramadan fasting (via Attaturk).
Question: There is a medicine for asthma patients, which is in the form of a spray containing a vapor-borne powder which enters the patient’s lungs through the mouth providing him relief. At times, asthma patients need to use it several times a day. Is it permissible to fast while using such a spray?
Answer: If it is compressed air mixed with medicine in the shape of powder or gas and enters the throat, the fast’s validity is problematic. If fasting without using it is difficult or impossible, using the medicine is permissible. However, it is a caution not to perform any other invalidator and to make qaḍā’ of the fast without using it, if possible.
Editor's translation : If you are merely sick but not in danger of dying, you may not alleviate your sickness with medicine during the fast. However, if you are reasonably sure that you will die without your medication, you may medicate yourself while fasting without incurring a significant amount of Holy wrath in the process.
For more complex situations, for example, if you believe that your demise is imminent in the absence of medication and hence take it but it turns out that you wouldn't really have died, answers about the final destination of your soul will be available with a premium membership.
Question: If somebody masturbates during the month of Ramadan but without any discharge, is his fasting invalidated?
Answer: if he do not intend masturbation and discharging semen and nothing is discharged, his fasting is correct even though he has done a ḥarām act. But, if he intends masturbation or he knows that he usually discharges semen by this process and semen really comes out, it is a ḥarām intentional breaking fasting.
Editor's translation : It is ok to masturbate while fasting as long as you are unaware that the act of stroking yourself repeatedly to the accompaniment of a brief, oh so brief moment of pleasure is actually masturbation.
If you have additional questions about asthma medication, masturbation or any other acts you are desirous of performing during Ramadan but are unsure about the (il)legalities that might be involved, please click on this url and pray that the question of the day matches your inquiry.