lib/version_info.rb in version_info-1.8.2 vs lib/version_info.rb in version_info-1.8.5

- old
+ new

@@ -6,16 +6,10 @@ # current segments or defaults def self.segments @segments ||= [:major, :minor, :patch] end - def self.segment_at(idx) - segments << :build if (segments.size == 3) && (idx>=3) - (segments.size..idx).each{|n| segments << "vinfo#{n}".to_sym} - @segments[idx] - end - # define segments def self.segments=(values) @segments = values end @@ -44,10 +38,10 @@ def self.versionable(other) if other.const_defined?(:VERSION, false) old_const = other.const_get(:VERSION, false) other.send(:remove_const, :VERSION) rescue true end - other.const_set(:VERSION, Data.new) + other.const_set(:VERSION, Data.new(VersionInfo.segments)) singleton = other.singleton_class singleton.class_eval do define_method :VERSION do @data ||= self::VERSION end