Fix circular argument reference warnings for ruby 2.2
Merge pull request #3370 from starbelly/deprecation_warnings

Fix circular argument reference warnings for ruby 2.2