Oh, gotcha. Thanks. C
On Jan 27, 2011, at 2:11 PM, Ross Singer wrote: > No, that's expected behavior (and how it's always been). You'd need > to do reader.rewind to put your enumerator cursor back to 0 to run > back over the records. > > It's basically an IO object (since that's what it expects as input) > and behaves like one. > > -Ross. > > On Thu, Jan 27, 2011 at 2:03 PM, Cory Rockliff <rockl...@bgc.bard.edu> wrote: >> So I was taking ruby-marc out for a spin in irb, and encountered a bit of a >> surprise. Running the following: >> >> require 'marc' >> reader = MARC::Reader.new('filename.mrc') >> reader.each {|record| puts record['245']} >> >> produces the expected result, but every subsequent call to reader.each >> {|record| puts record['245']} returns nil. >> >> Am I missing something obvious? I don't remember this being the case before. >> >> Thanks! >> >> Cory >> >> [running ruby-marc off the github repo / os x 10.6.5 / ruby 1.9.2 via rvm / >> rubygems via homebrew] >> > --- > [This E-mail scanned for viruses by Declude Virus] > > --- > [This E-mail scanned for viruses by Declude Virus] > > Cory Rockliff Technical Services Librarian Bard Graduate Center: Decorative Arts, Design History, Material Culture 38 West 86th Street, New York, NY 10024 T 212 501 3037 E rockl...@bgc.bard.edu W bgc.bard.edu/library BGC Exhibitions: In the Main Gallery: January 26, 2011–April 17, 2011 Cloisonné: Chinese Enamels from the Yuan, Ming, and Qing Dynasties In the Focus Gallery: January 26, 2011–April 17, 2011 Objects of Exchange: Social and Material Transformation on the Late-Nineteenth-Century Northwest Coast