Unexpected ruby-marc behavior

From: Cory Rockliff <rockliff_at_nyob>
Date: Thu, 27 Jan 2011 14:03:05 -0500
To: CODE4LIB_at_LISTSERV.ND.EDU
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]
Received on Thu Jan 27 2011 - 14:03:28 EST