Bug #4474 » patch2.diff
lib/pstore.rb | ||
---|---|---|
end
|
||
end
|
||
value
|
||
rescue ThreadError
|
||
raise PStore::Error, "nested transaction"
|
||
end
|
||
private
|
test/test_pstore.rb | ||
---|---|---|
File.unlink("pstore.tmp2.#{Process.pid}") rescue nil
|
||
end
|
||
end
|
||
|
||
def test_nested_transaction_raises_error
|
||
assert_raise(PStore::Error) do
|
||
@pstore.transaction { @pstore.transaction { } }
|
||
end
|
||
pstore = PStore.new("pstore.tmp2.#{Process.pid}", true)
|
||
assert_raise(PStore::Error) do
|
||
pstore.transaction { pstore.transaction { } }
|
||
end
|
||
end
|
||
end
|
- « Previous
- 1
- 2
- 3
- Next »