Closed pbernery closed 12 years ago
Deleting them outside #each
makes the spec pass, however I wonder if it is the right behavior as build files are unrelated.
EDIT: well, of course modifying an array while browsing it has side effects... I think I misuse the API.
I updated the spec accordingly.
I am trying to fix an issue in Xcodeproj.
I try to update an Xcode project by removing build files. I found a problem when deleting while browsing them in a build phase: the
each
method ofAbstractBuildPhase#files
does not return all files.I added a spec that points out the problem. I commited it in the branch https://github.com/CocoaPods/Xcodeproj/tree/fix_build_files_removal branch. The commit that adds the spec: https://github.com/CocoaPods/Xcodeproj/commit/52cb6e1b46aa21b4268ba869cfc4b2ad0b5d5905.
The test is called removes several build files from a build phase. You can adjust the
number_of_files
variable in this test.#each
calls the block _number_offiles / 2 with an even number, _number_offiles / 2 + 1 with an odd number.