lib/citrus.rb in citrus-2.1.1 vs lib/citrus.rb in citrus-2.1.2

- old
+ new

@@ -6,11 +6,11 @@ # # http://mjijackson.com/citrus module Citrus autoload :File, 'citrus/file' - VERSION = [2, 1, 1] + VERSION = [2, 1, 2] # Returns the current version of Citrus as a string. def self.version VERSION.join('.') end @@ -114,10 +114,17 @@ attr_reader :cache # The number of times the cache was hit. Only present if memoing is enabled. attr_reader :cache_hits + # Resets all internal variables so that this object may be used in + # another parse. + def reset + super + @max_offset = 0 + end + # Returns the length of this input. def length string.length end @@ -210,14 +217,11 @@ else c[pos] = super end end - # Resets all internal variables so that this object may be used in - # another parse. - def reset + def reset # :nodoc: super - @max_offset = 0 @cache = {} @cache_hits = 0 end end