我刚开始使用 Sequel rubygem,似乎“断开连接”方法不起作用。这是我的 IRB 测试会话的输出:
1.9.3-p194 :002 > require 'sequel'
=> true
1.9.3-p194 :003 > DB = Sequel.connect('postgres://postgres:mypassword@my_pg_host:5432/my_db')
=> #<Sequel::Postgres::Database: "postgres://postgres:mypassword@my_pg_host:5432/my_db">
1.9.3-p194 :004 > DB.test_connection
=> true
1.9.3-p194 :005 > DB.disconnect
=> []
1.9.3-p194 :006 > DB.test_connection
=> true
我在 Sequel 文档中看不到任何说明为什么这不起作用的内容:
http://sequel.rubyforge.org/rdoc/classes/Sequel/Database.html#method-i-disconnect
我错过了什么吗?