$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) module Bencoding def self.load(io) Parser.load(io) end def self.dump(object) object.to_bencoding end end require File.join(File.dirname(__FILE__), "bencoding/parser") require File.join(File.dirname(__FILE__), "bencoding/array") require File.join(File.dirname(__FILE__), "bencoding/hash") require File.join(File.dirname(__FILE__), "bencoding/integer") require File.join(File.dirname(__FILE__), "bencoding/string") Array.send :include, Bencoding::Array Hash.send :include, Bencoding::Hash Integer.send :include, Bencoding::Integer String.send :include, Bencoding::String