SQLite/ActiveRecord and Backslashes

I've got a problem with some combination of SQLite, ActiveRecord, and my
brain. Backslashed strings don't load properly from ActiveRecord, as shown
by the following script:

  require 'rubygems'
  require 'sqlite'
  require_gem 'activerecord'
  require 'test/unit'

  File.delete( "test.db" ) if File.exist?( "test.db" )
  db = SQLite::Database.new( "test.db", 0644 )
  db.execute <<EOE
      CREATE TABLE samples (
        id INTEGER PRIMARY KEY,
        name VARCHAR( 255 )
      )
  EOE
  db.close

  class Sample < ActiveRecord::Base; end

  ActiveRecord::Base.establish_connection(
    :adapter => "sqlite",
    :dbfile => "test.db"
  )

  class TC_ActiveRecordSqliteError < Test::Unit::TestCase

    def test_backslash
      sample = Sample.new 'name' => '\\'
      assert sample.save
      assert_equal '\\', sample.name ## this works
      sample_copy = Sample.find sample.id
      assert_equal '\\', sample_copy.name ## this fails
    end

  end

This produces:
  1) Failure:
test_backslash(TC_ActiveRecordSqliteError)
[C:/Clients/newlite/spike/error.rb:30]:
<"\\"> expected but was
<"\\\\">.

Anyone have any idea whats wrong, or how to fix it?

David
http://homepages.ihug.com.au/~naseby/