From: Joel VanderWerf Date: 2002-08-25T02:21:51+09:00 Subject: Re: Can I write to DATA? nobu.nokada@softhome.net wrote: > Hi, > > At Fri, 23 Aug 2002 12:36:33 +0900, > Joel VanderWerf wrote: > >>>script_size = __DATA__.pos >> >>The following script prints -1. Is there some other way to get the >>position without parsing? >> >>--- >>p DATA.pos >>__END__ >>this is some data. > > > This code gave 19 for me. What's your ruby version (and > release date) and platform? puts RUBY_VERSION # ==> 1.6.7 puts RUBY_PLATFORM # ==> i686-linux puts RUBY_RELEASE_DATE # ==> 2002-03-01 #p __DATA__.type # ==> NameError p DATA.pos # ==> -1 __END__ this is some data. It looks like maybe __DATA__ is in 1.7?