Patients will be randomized to receive either lansoprazole or ranitidine intravenously by continuous intravenous infusion on the morning of surgery and on each of the subsequent 4 days. Computer randomization will be used with the code kept by pharmacy. The allocation will be concealed. Medication will be delivered in a sealed, unlabeled container from the pharmacy. Patients will be stratified between placebo and lansoprazole by preceding ASA/NSAID use. Lansoprazole will be given as a 60 mg bolus preoperatively followed by 6 mg per hour throughout the duration of the study. At the time of airway intubation in the operating room for the surgery, a nasogastric tube with a built-in intragastric pH electrode (Zinetics, Inc) will be passed into the mid-stomach by the anesthesiologist in place of the standard nasogastric tube. Intragastric pH will be measured during the perisurgical period until the morning of postoperative day 4, 72 hours after surgery. At that time, the nasogastric tube/pH probe will be removed and patients will undergo esophagogastroduodenoscopy (EGD) under sedation with midazolam and fentanyl. During the endoscopy, the maximum number of submucosal hemorrhages and erosions in an endoscopic field from the anterior and posterior walls of the antrum will be counted. Modified Lanza scores for both the stomach and the duodenum will be determined to quantify gastric and duodenal erosions and ulcerations6. We will also determine the LA classification of esophageal injury and inflammation. Before removal of the endoscope, a wireless pH capsule (Bravo pH capsule; Medtronic, Inc) will be placed in the body of the stomach 12 cm below the squamocolumnar junction for an additional two day measurement of intragastric pH or until the time of discharge from the hospital if less than 48 hours from the EGD. Thus, intragastric pH will be monitored from the morning that the patient undergoes surgery for 6 days or until the time of discharge.