Ruby compatibility issues

- regexp engines are different from 1.8 to 1.9, fixed the literal shorthand regexp accordingly
  - changed the shorthand regexp text from a match to a string scan
  - test_helper now loads rubygems unless RUBY_VERSION is > 1.9
This commit is contained in:
DBA
2010-08-24 08:17:42 +08:00
committed by Tobias Lütke
parent 772233d881
commit 3d43efe2bc
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ module Liquid
PartialTemplateParser = /#{TagStart}.*?#{TagEnd}|#{VariableStart}.*?#{VariableIncompleteEnd}/
TemplateParser = /(#{PartialTemplateParser}|#{AnyStartingTag})/
VariableParser = /\[[^\]]+\]|#{VariableSegment}+\??/
LiteralShorthand = /^(?:{{{\s?)(.*?)(?:\s*}}})$/
LiteralShorthand = /^(?:\{\{\{\s?)(.*?)(?:\s*\}\}\})$/
end
require 'liquid/drop'