Class: DFuzz::Fudge
Overview
Generate Xi-F…Xi+F for each Xi in boundaries and fudge_factor F
Instance Method Summary collapse
-
#initialize(boundaries, fudge_factor, mask = nil) ⇒ Fudge
constructor
A new instance of Fudge.
Constructor Details
#initialize(boundaries, fudge_factor, mask = nil) ⇒ Fudge
Returns a new instance of Fudge.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruckus/dfuzz.rb', line 21 def initialize(boundaries, fudge_factor, mask = nil) super() { |g| boundaries.each {|b| 0.upto(fudge_factor) { |f| if (mask) g.yield((b+f) & mask) g.yield((b-f) & mask) else g.yield b+f g.yield b-f end } } } end |