ruby/rack: minor refactor