Packages.rb - small Ruby refactoring