Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Rubinius' melbourne parser extracted into a gem (without the actual Rubinius) - create ASTs for arbitrary Ruby code
Ruby C++ C


Melbourne is Rubinius' parser component. The +melbourne+ gem extracts this parser component for stand-alone use under MRI and other environments.

For Melbourne's full RDoc, see


Melbourne generates abstract syntax trees (ASTs) from Ruby source code:

require 'melbourne'

'class Test; end'.to_ast # => <AST::Class:0x1017800f8
                                @body=#<AST::EmptyBody:0x101780058 @line=1>,
                                @name=#<AST::ClassName:0x101780080 @line=1, @superclass=#<AST::Nil:0x1017800a8 @line=1>, @name=:Test>,
                                @superclass=#<AST::Nil:0x1017800a8 @line=1>>

Abstract Syntax Trees

Abstract syntax trees allow for deep introspection of Ruby source code and are far easier to handle than e.g. S-expressions as provided by ParseTree and other gems.

For more information on abstract syntax trees, see Wikipedia.


The original code of Melbourne is part of the Rubinius project and was written by and is © Evan Phoenix.

Melbourne was extracted from Rubinius into this gem by Marco Otte-Witte.

Bugs/ Feature Requests

the +melbourne+ gem is not maintained by the Rubinius team! If you encounter bugs or have feature requests, refer to the Github repository.

Something went wrong with that request. Please try again.