From: Eric Hodel Date: 2008-04-15T09:23:34+09:00 Subject: Re: Where's DATA? On Apr 14, 2008, at 07:21 AM, Trans wrote: > Anyone have any idea why I would be getting? > > uninitialized constant Box::Command::DATA (NameError) > > when DATA is supposed to reference the text below __END__? This error > doesn't make any sense to me. > > $ ruby -v > ruby 1.8.6 (2007-06-07 patchlevel 36) [x86_64-linux] $ cat data.rb p DATA.read __END__ woo! $ ruby data.rb "woo!\n" $ ruby -r data -e 0 ./data.rb:1: uninitialized constant DATA (NameError) There is only one DATA, there is not a DATA per file. PS: This is more appropriate for ruby-talk.