Mahoro 0.4 - a Ruby interface to libmagic

Mahoro - a Ruby interface to libmagic

An interface to libmagic to determine file types using “magic” numbers.
This can be used in place of calling the file(1) command in Ruby
Shu-yu Guo is the original author but all maintenance is handled by
Eric W. nowadays.

source: git clone git://
cgit web viewer:
mailing list: [email protected] (plain-text only, please)
maintainer: Eric W. [email protected]

Feel free to contact Eric W. privately via plain-text email if you’re
comfortable with the public mailing list.

Changes since v0.3:

All public API methods are now documented, using “ri” documentation
(built during the RubyGems install) is recommended for users.
Plain-text API documentation is also available online:

On Ruby 1.9 and 2.0, Mahoro now releases the GVL for all operations
which may touch the filesystem. This allows several threads with
thread-local Mahoro objects to simultaneously work on multiple files

Since libmagic is not thread-safe, neither is Mahoro (by default). An
optional Mahoro::ThreadSafe module now exists for applications which
spawn many short-lived threads. Applications using long-lived threads
and needing real concurrency should use thread-local Mahoro objects
instead of the ThreadSafe module.

Eric W. (10):
INSTALL: improve documentation for deb/rpm-based distros
gemspec: cleanup and update rdoc options
add RDoc documentation
test: be more flexible with Mahoro::NONE matches
release GVL if filesystem I/O is required
Mahoro#file supports objects with #to_path support
split out nogvl_compat header
cleanup: make cMahoro an automatic variable
add optional thread-safety module
tree reorganization + various maint fixes