Sha256: 8c31d108d80b72995b7d715e417367ccb83223b7b13b3a2d108aa1e64467f67c
Contents?: true
Size: 247 Bytes
Versions: 11
Compression:
Stored size: 247 Bytes
Contents
module WithExitstatus def with_exitstatus_returning(code) saved_exitstatus = $?.nil? ? 0 : $?.exitstatus begin `ruby -e "exit #{code.to_i}"` yield ensure `ruby -e "exit #{saved_exitstatus.to_i}"` end end end
Version data entries
11 entries across 11 versions & 2 rubygems