Misc utilities with Ruby