right_popen 1.0.18-x86-mswin32-60 → 1.0.19-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,6 +23,6 @@
23
23
 
24
24
  module RightScale
25
25
  module RightPopen
26
- VERSION = "1.0.18"
26
+ VERSION = "1.0.19"
27
27
  end
28
28
  end
Binary file
@@ -58,6 +58,21 @@ module RightScale
58
58
  end
59
59
  end
60
60
 
61
+ it 'should close all IO handlers, except STDIN, STDOUT and STDERR' do
62
+ GC.start
63
+ command = "\"#{RUBY_CMD}\" \"#{File.expand_path(File.join(File.dirname(__FILE__), 'produce_status.rb'))}\" #{EXIT_STATUS}"
64
+ runner = Runner.new
65
+ status = runner.run_right_popen(command)
66
+ status.status.exitstatus.should == EXIT_STATUS
67
+ useless_handlers = 0
68
+ ObjectSpace.each_object(IO) do |io|
69
+ if ![STDIN, STDOUT, STDERR].include?(io)
70
+ useless_handlers += 1 unless io.closed?
71
+ end
72
+ end
73
+ useless_handlers.should == 0
74
+ end
75
+
61
76
  it 'should preserve the integrity of stdout when stderr is unavailable' do
62
77
  count = LARGE_OUTPUT_COUNTER
63
78
  command = "\"#{RUBY_CMD}\" \"#{File.expand_path(File.join(File.dirname(__FILE__), 'produce_stdout_only.rb'))}\" #{count}"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_popen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 18
10
- version: 1.0.18
9
+ - 19
10
+ version: 1.0.19
11
11
  platform: x86-mswin32-60
12
12
  authors:
13
13
  - Scott Messier
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-12-08 00:00:00 -08:00
20
+ date: 2012-03-01 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency