Sorry, Guy.

That change causes the following output:

>ruby testMarshal3.rb
"#<Record:0xa0354c0>"
testMarshal3.rb:39: undefined method `string' for
"#<Record:0xa0354c0>":String (NameError)
>Exit code: 1

It's apparently not calling <Record._load> or <_dump>

As a workaround I have overridden the <[]>, <[]=>, and <each>
instance methods and invoked Marshal explicitly in these methods.

require 'bdb'
module BDB
	class SortedBtree < Btree
		extend Marshal
		def SortedBtree.create(fileName)
			super(fileName, nil, 
				BDB::CREATE | BDB::TRUNCATE, 
				0644,
				'set_pagesize'		=> 1024, 
				'set_bt_compare'	=> proc{|a,b|a <=> b})
				#'marshal'				=> true)			
		end
	end # class SortedBtree
end
class Record

	attr_accessor(:string)

	def Record._load(str)
		rec = new
		rec.string = str
		rec
	end	
	
	def _dump(depth)
		puts '===================='
		puts caller.join("\n")
		self.string
	end
end

theString = 'StringOne'
file = BDB::SortedBtree.create('sbtree.bdb')
fileRecord = Record.new
fileRecord.string = theString
file['One'] = fileRecord		
fileRecord = file['One']
p fileRecord
p fileRecord.string.class	
puts (fileRecord.string == theString ? 'success' : 'failure')

-- 
"It requires wisdom to understand wisdom:
 the music is nothing if the audience is deaf."
 - Walter Lippman