Sha256: 4469572bdaa7b659662b164ec61a6570fd79819aafa52490181bd1893dea4c80

Contents?: true

Size: 565 Bytes

Versions: 87

Compression:

Stored size: 565 Bytes

Contents

module Kernel
  # alias the original require away to use later
  alias :amalgalite_original_require :require

  #
  # hook into the system 'require' to allow for required text or blobs from an
  # amalgalite database.  
  #
  def require( filename )
    loaded = amalgalite_original_require( filename )
  rescue LoadError => load_error
    if load_error.message =~ /#{Regexp.escape filename}\z/ then
      loaded = Amalgalite::Requires.require( filename )
    else
      raise load_error
    end
  end

  private :require
  private :amalgalite_original_require
end

Version data entries

87 entries across 87 versions & 2 rubygems

Version Path
amalgalite-1.1.1-x86-mingw32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-1.1.1-x86-mswin32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-1.1.1 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-1.0.0 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-1.0.0-x86-mswin32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-1.0.0-x86-mingw32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.15.0-x86-mingw32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.15.0-x86-mswin32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.15.0 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.12.0-x86-mingw32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.12.0 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.12.0-x86-mswin32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.11.0-x86-mswin32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.11.0-x86-mingw32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.10.2-x86-mswin32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.10.2-x86-mingw32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.10.1-x86-mswin32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.10.1-x86-mingw32 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.10.0-x86-mswin32-60 lib/amalgalite/core_ext/kernel/require.rb
amalgalite-0.11.0 lib/amalgalite/core_ext/kernel/require.rb