From: Hassan Schroeder Date: 2012-07-22T08:10:09+09:00 Subject: Re: File.open error when variable is used On Sat, Jul 21, 2012 at 3:50 PM, Wayne Mr. wrote: > I have a situation in a ruby program where a filename is being passed as > an argument to a program and is being used in the program as follows: > > File.open($fileName, "r") Is there a particular reason to use a global variable? > The file refuses to open for read and the program abends Uh, "abends"? Probably a JCL error then. Check the floor for any dropped punch cards :-) Sigh. Anyway. Unlikely to be able to help without knowing the platform, *exact* version of Ruby, the *exact* error message, and having a test case to reproduce. -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan