Skip to content

Instantly share code, notes, and snippets.

@rickhull
Created May 31, 2013 23:15
Show Gist options
  • Save rickhull/5688580 to your computer and use it in GitHub Desktop.
Save rickhull/5688580 to your computer and use it in GitHub Desktop.
require 'treetop'
#=> true
require 'polyglot'
#=> false
# I would expect polyglot to not have been required already
In order to use Polyglot dynamic loading of .treetop or .tt files though, you need to require the Polyglot gem before you require the Treetop gem as Treetop will only create hooks into Polyglot for the treetop files if Polyglot is already loaded. So you need to use:
require 'polyglot'
require 'treetop'
in order to use Polyglot auto loading with Treetop in Ruby.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment