Sha256: d8c8a468da008e8488c127bdce988e2cdafe73d8bf18ff996ac221db7a1f9398
Contents?: true
Size: 247 Bytes
Versions: 3
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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cocaine-0.1.0 | spec/support/with_exitstatus.rb |
cocaine-0.0.2 | spec/support/with_exitstatus.rb |
cocaine-0.0.1 | spec/support/with_exitstatus.rb |