<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,9 +7,7 @@ module Kernel
   # amalgalite database.  
   #
   def require( filename )
-    if Amalgalite::Requires.use_original_require? then
-      loaded = amalgalite_original_require( filename )
-    end
+    loaded = amalgalite_original_require( filename )
   rescue LoadError =&gt; load_error
     if load_error.message =~ /#{Regexp.escape filename}\z/ then
       loaded = Amalgalite::Requires.require( filename )</diff>
      <filename>lib/amalgalite/core_ext/kernel/require.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,20 +18,6 @@ module Amalgalite
       end
 
       #
-      # Global option to say whether to use the global ruby requires or not
-      #
-      def use_original_require
-        @use_original_require ||= true
-      end
-
-      #
-      # Set whether or not to fallback to the original ruby requires or not.
-      #
-      def use_original_require=( use_it )
-        @use_original_require ||= use_it
-      end
-
-      #
       # Allocate a database connection to the given filename
       #
       def db_connection_to( dbfile_name )
@@ -109,6 +95,7 @@ module Amalgalite
         return false
       else
         begin
+          filename = filename.gsub(/\.rb\Z/,'')
           rows = db_connection.execute(sql, filename)
           if rows.size &gt; 0 then
             row = rows.first</diff>
      <filename>lib/amalgalite/requires.rb</filename>
    </modified>
    <modified>
      <diff>@@ -83,6 +83,9 @@ module Amalgalite
     def execute( *params )
       bind( *params )
       begin
+        # save the error state at the beginning of the execution.  We only want to
+        # reraise the error if it was raised during this execution.
+        s_before = $!
         if block_given? then
           while row = next_row
             yield row
@@ -96,7 +99,7 @@ module Amalgalite
           reset_for_next_execute!
         rescue =&gt; e
         end
-        raise s if s
+        raise s if s != s_before
       end
     end
 </diff>
      <filename>lib/amalgalite/statement.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5a2094f015e66cd892ea3a07f4543954fe70fc8c</id>
    </parent>
  </parents>
  <author>
    <name>Jeremy Hinegardner</name>
    <email>jeremy@hinegardner.org</email>
  </author>
  <url>http://github.com/copiousfreetime/amalgalite/commit/8675678b6e9663f9e22c11551657041b7ff42770</url>
  <id>8675678b6e9663f9e22c11551657041b7ff42770</id>
  <committed-date>2008-11-16T21:47:32-08:00</committed-date>
  <authored-date>2008-11-16T21:47:32-08:00</authored-date>
  <message>fix raising error if the code is executed in a rescue block</message>
  <tree>3df5f5ad7ddbe398c0f7f538eb732a72552c91cb</tree>
  <committer>
    <name>Jeremy Hinegardner</name>
    <email>jeremy@hinegardner.org</email>
  </committer>
</commit>
