lib/ring/sqa/analyzer.rb in ring-sqa-0.0.20 vs lib/ring/sqa/analyzer.rb in ring-sqa-0.0.21
- old
+ new
@@ -37,13 +37,14 @@
end
class AnalyzeBuffer
attr_reader :array
def initialize nodes_count, max_size=30, median_of=27
- @max_size = max_size
- @median_of = median_of
- init_nodes = Array.new nodes_count * 2, ''
- @array = Array.new max_size, init_nodes
+ @max_size = max_size
+ @median_of = median_of
+ nodes_count = CFG.fake? ? 0 : nodes_count
+ init_nodes = Array.new nodes_count * 2, ''
+ @array = Array.new max_size, init_nodes
end
def push e
@array.shift
@array.push e
end