John Rubinubi <rubinubi / cyberspace.org> writes: > I want to read data from my program file rather than from an external > file. I read in Programming Ruby that DATA is a "global IO object" > and that reading from it will return lines following the __END__ > but I can't seem to find a way to do it. > > Can someone please help with something like... > > puts "hello world" > #somehow read and print the stuff after __END__ > __END__ > this is some data > this data should be printed > then I'll be happy puts "hello world" puts DATA.read __END__ and goodbye cruel newsgroup Dave