Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 8b979d4370898f87e34e8e3ee0f30a6634aee7d1 1 parent 7d03bcb
@mjackson authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/citrus/grammars.rb
View
3  lib/citrus/grammars.rb
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.