# Polyglot 0.1.0 Released

**URL:** <https://www.ruby-forum.com/t/polyglot-0-1-0-released/118129>\
**Category:** Ruby\
**Created:** [October 24, 2007, 3:41am UTC](https://www.ruby-forum.com/t/polyglot-0-1-0-released/118129 "2007-10-24T03:41:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clifford\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Post date:** [October 24, 2007, 3:41am UTC](https://www.ruby-forum.com/t/polyglot-0-1-0-released/118129/1 "2007-10-24T03:41:42Z")

</div>

Polyglot version 0.1.0 has been released!

- [http://polyglot.rubyforge.org](http://polyglot.rubyforge.org)

Allows custom language loaders for specified file extensions to be  
hooked into require.

For anyone who’s ever needed to load non-Ruby file types, especially to  
implement  
a fully-custom DSL (as opposed to a Ruby DSL), this gem allows you to  
simply require  
the file-type handler, then require your file.

The file-type handler is a loader for files identified by your special  
filename extension.  
It registers itself with polyglot, which aliases Kernel.require.

When you then require “myfile”, polyglot will first attempt a normal  
Ruby ‘require’, and  
if that fails, will search the Ruby load path for a filename matching  
any of the registered  
extensions, and call the loader for that extension.

As an example, I’m building a query language called CQL. \*.cql files can  
be loaded by a  
parser which creates Ruby classes. All I have to do is:

require “cql”  
require “myqueries”

and the CQL loader will load “myqueries.cql”.

You might need to wait a few hours for the gem to populate into the  
mirrors.

Clifford H…
