Bug in nested transactions in rails 2.3.x

Hello!

According to ActiveRecord transactions documentation,

User.transaction do
    User.create(:username => 'Kotori')
    User.transaction(:requires_new => true) do
      User.create(:username => 'Nemu')
      raise ActiveRecord::Rollback
    end
  end

  User.find(:all) # => Returns only Kotori

But I get both records in database (tested on PostgreSQL and MySQL).
In this case:

User.transaction do
    User.create(:username => 'Kotori')
    User.transaction(:requires_new => true) do
      User.create(:username => 'Nemu')
      raise 'something' # ActiveRecord::Rollback
    end
  end

everything seems to be okay.

Also, in cases/transactions_test.rb there is no test for raising
AR::Rollback, only for generic raise.

Sorry, this was my fail

According to link bellow this is a bug in documentation

https://rails.lighthouseapp.com/projects/8994/tickets/1951-activerecordrollback-does-not-work-in-nested-transactions

Here a patch to documentation

https://gist.github.com/733479