From: Simon Strandgaard Date: 2004-05-21T15:38:00+09:00 Subject: Re: [rcr] make File#dup intuitive nobu.nokada@softhome.net wrote: > At Fri, 21 May 2004 01:22:49 +0900, > Simon Strandgaard wrote in [ruby-talk:100910]: > > position is not copied.. try this example for yourself > > I've expected it had been fixed. > > This patch works? I just applied your patch.. it seems as the position now gets zeroed. server> ruby a.rb 5 0 server> cat a.rb f1 = File.open(__FILE__, 'r') f1.seek(5) p f1.pos # -> 5 f2 = f1.dup p f2.pos # -> garbage server> -- Simon Strandgaard