uninitialized constant DATA (NameError)

I have a very simple script that is trying to read the data past the __END__ statement.  I get an error thrown "uninitialized constant DATA (NameError)".  I can cut the very same script into Netbeans and it runs fine.  Not sure what the problem is.  I'm using Rubymine 3.2.4 on Windows with JDK 1.6.0_22.  Any clues???

puts DATA.read
__END__
BEGIN  Version Description =====================================
Version Name (to 31 chars)................... = GENERIC
+ Value in PostWare Field Version_ID......... = 0001
Bindery Name (to 31 chars)................... =

1 comment

RubyMine uses some trick to get stdin and stdout flush correctly. It looks like these tricks conflict with reading DATA. You can simply clear VM options in your run configuration and script will run fine.

0

Please sign in to leave a comment.