Refactored to remove unused variable
Merge pull request #9967 from choudhuryanupam/fix_actionpack_test_cases

Refactored to remove unused loop variable