<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2584,6 +2584,29 @@ VALUE env_get_tmp_dir(VALUE obj)
   return rb_str_new2(tmp_dir);
 }
 
+/*
+ * call-seq:
+ * env.get_home -&gt; home
+ *
+ * get home
+ */
+VALUE env_get_home(VALUE obj)
+{
+  t_envh *eh;
+  const char *home;
+  int rv;
+
+  Data_Get_Struct(obj,t_envh,eh);
+  if (!eh-&gt;env)
+    raise(0, &quot;env is closed&quot;);
+  rv=eh-&gt;env-&gt;get_home(eh-&gt;env,&amp;home);
+  if ( rv != 0 ) {
+    raise_error(rv, &quot;env_get_home: %s&quot;,db_strerror(rv));
+  }
+
+  return rb_str_new2(home);
+}
+
 static void txn_finish(t_txnh *txn)
 {
   if ( RTEST(ruby_debug) )
@@ -2838,6 +2861,7 @@ void Init_bdb() {
 	rb_define_method(cEnv,&quot;get_lg_dir&quot;,env_get_lg_dir,0);
   rb_define_method(cEnv,&quot;set_tmp_dir&quot;,env_set_tmp_dir,1);
 	rb_define_method(cEnv,&quot;get_tmp_dir&quot;,env_get_tmp_dir,0);
+	rb_define_method(cEnv,&quot;get_home&quot;,env_get_home,0);
 
   cTxnStat = rb_define_class_under(mBdb,&quot;TxnStat&quot;,rb_cObject);
   rb_define_method(cTxnStat,&quot;[]&quot;,stat_aref,1);</diff>
      <filename>ext/bdb.c</filename>
    </modified>
    <modified>
      <diff>@@ -86,5 +86,16 @@ class EnvTest &lt; Test::Unit::TestCase
     env.set_tmp_dir('/tmp')
     assert_equal '/tmp', env.get_tmp_dir    
   end
+
+  def test_get_home
+    env = Bdb::Env.new(0)
+    tmp_dir = File.expand_path(File.join(File.dirname(__FILE__), 'tmp'))
+    mkdir_p tmp_dir
+    env.open(tmp_dir, Bdb::DB_CREATE, 0);
+    assert_equal tmp_dir, env.get_home
+    env.close
+  ensure
+    rm_rf tmp_dir
+  end
   
 end</diff>
      <filename>test/env_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3fc7b7533ebbade71bd80725908b8909c4c29f6c</id>
    </parent>
  </parents>
  <author>
    <name>mattbauer</name>
    <email>bauer@mmmultiworks.com</email>
  </author>
  <url>http://github.com/mattbauer/bdb/commit/fdc66853722fe9936f5033287efa432ca7aa6e13</url>
  <id>fdc66853722fe9936f5033287efa432ca7aa6e13</id>
  <committed-date>2009-01-04T22:00:59-08:00</committed-date>
  <authored-date>2009-01-04T22:00:59-08:00</authored-date>
  <message>Add get_home to Bdb::Env</message>
  <tree>0035da02e4c71d1f5e644974c59de6d76ae38d7d</tree>
  <committer>
    <name>mattbauer</name>
    <email>bauer@mmmultiworks.com</email>
  </committer>
</commit>
