Permalink
Browse files

Make it safe to require 'citrus/grammars' multiple times

  • Loading branch information...
1 parent 7d03bcb commit 8b979d4370898f87e34e8e3ee0f30a6634aee7d1 @mjackson committed Jul 5, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/citrus/grammars.rb
View
@@ -8,4 +8,5 @@
require 'citrus'
-$LOAD_PATH.unshift(::File.expand_path('../grammars', __FILE__))
+grammars = ::File.expand_path(::File.join('..', 'grammars'), __FILE__)
+$LOAD_PATH.unshift(grammars) unless $LOAD_PATH.include?(grammars)

0 comments on commit 8b979d4

Please sign in to comment.