diff -Naur /Library/Ruby/Gems/1.8/gems/quickbooks-1.0.3/lib/quickbooks.rb /opt/local/lib/ruby/gems/1.9.1/gems/quickbooks-1.0.3/lib/quickbooks.rb --- /Library/Ruby/Gems/1.8/gems/quickbooks-1.0.3/lib/quickbooks.rb 2010-01-28 17:08:20.000000000 -0800 +++ /opt/local/lib/ruby/gems/1.9.1/gems/quickbooks-1.0.3/lib/quickbooks.rb 2010-01-29 12:53:41.000000000 -0800 @@ -69,15 +69,12 @@ # Set or retrieve the current qbxml_version the gem is running at. If autoload is true, it will ask Quickbooks # (via the current connection) for the qbxml versions it supports, then choose the latest that the gem also supports. def qbxml_version(autoload=false) - @qbxml_version ||= if autoload - version = nil - connection.qbxml_versions.sort.reverse.each do |version| - break if QBXML_XSD_FILES.include?(version) && File.exists?(File.dirname(__FILE__) + "/../source/#{QBXML_XSD_FILES[version]}.xsd") + if (autoload) + @qbxml_version ||= connection.qbxml_versions.sort.reverse.find do |version| + QBXML_XSD_FILES.include?(version) && File.exists?(File.dirname(__FILE__) + "/../source/#{QBXML_XSD_FILES[version]}.xsd") end - version - else - nil end + @qbxml_version end def qbxml_version=(version) @qbxml_version = version