More Warnings removed for ruby trunk

Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
shadowing variable warning removed
Merge pull request #12728 from arunagw/aa-warnings-removed-ruby-trunk

More Warnings removed for ruby trunk