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)................... =
请先登录再写评论。
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.