Fixed bug that caused runtime error in module_rank.rb
Land #2877, module_rank.rb TypeError fix