module Optparse
  module Pathname
    # Your code goes here...
  end
end

require 'optparse'
require 'pathname'

OptionParser.accept Pathname do |path|
  Pathname.new path if path
end

Make Pathname acceptable to OptionParser
Make Pathname acceptable to OptionParser
