```ruby
require 'leveldb/leveldb' # the c extension

module LevelDB
class DB
  include Enumerable
  class << self

    ## Loads or creates a LevelDB database as necessary, stored on disk at
    ## +pathname+.
    def new pathname
      make pathname.to_str, true, false
    end

    ## Creates a new LevelDB database stored on disk at +pathname+. Throws an
    ## exception if the database already exists.
    def create pathname
      make pathname.to_str, true, true
    end

    ## Loads a LevelDB database stored on disk at +pathname+. Throws an
    ## exception unless the database already exists.
    def load pathname
      make pathname.to_str, false, false
    end
  end

  alias :includes? :exists?
  alias :contains? :exists?
  alias :member? :exists?
  alias :[] :get
  alias :[]= :put

  def keys; map { |k, v| k } end
  def values; map { |k, v| v } end
end
end
```

Use File.path to coerce pathname arguments into Strings in 1.9
user
```ruby
require 'leveldb/leveldb' # the c extension

module LevelDB
class DB
  include Enumerable
  class << self

    ## Loads or creates a LevelDB database as necessary, stored on disk at
    ## +pathname+.
    def new pathname
      make path_string(pathname), true, false
    end

    ## Creates a new LevelDB database stored on disk at +pathname+. Throws an
    ## exception if the database already exists.
    def create pathname
      make path_string(pathname), true, true
    end

    ## Loads a LevelDB database stored on disk at +pathname+. Throws an
    ## exception unless the database already exists.
    def load pathname
      make path_string(pathname), false, false
    end

    private

    ## Coerces the argument into a String for use as a filename/-path
    def path_string pathname
      File.respond_to?(:path) ? File.path(pathname) : pathname.to_str
    end

  end

  alias :includes? :exists?
  alias :contains? :exists?
  alias :member? :exists?
  alias :[] :get
  alias :[]= :put

  def keys; map { |k, v| k } end
  def values; map { |k, v| v } end
end
end
```
assistant