Method: Rex::JobContainer#each
- Defined in:
- lib/rex/job_container.rb
#each(&block) ⇒ Object
Overrides the builtin ‘each’ operator to avoid the following exception on Ruby 1.9.2+
"can't add a new key into hash during iteration"
185 186 187 188 189 190 191 |
# File 'lib/rex/job_container.rb', line 185 def each(&block) list = [] self.keys.sort.each do |sidx| list << [sidx, self[sidx]] end list.each(&block) end |