Created
May 31, 2013 23:15
-
-
Save rickhull/5688580 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'treetop' | |
#=> true | |
require 'polyglot' | |
#=> false | |
# I would expect polyglot to not have been required already |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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