rubysh 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rubysh/util.rb +9 -3
- data/lib/rubysh/version.rb +1 -1
- metadata +4 -4
data/lib/rubysh/util.rb
CHANGED
|
@@ -10,12 +10,18 @@ module Rubysh
|
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# Leaks memory (needed to avoid Ruby 1.8's IO autoclose
|
|
14
|
-
# and so you should only use it right before
|
|
13
|
+
# Leaks memory in 1.8 (needed to avoid Ruby 1.8's IO autoclose
|
|
14
|
+
# behavior), and so you should only use it in pre-1.9 right before
|
|
15
|
+
# execing.
|
|
15
16
|
def self.io_without_autoclose(fd_num)
|
|
16
17
|
fd_num = to_fileno(fd_num)
|
|
17
18
|
io = IO.new(fd_num)
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
if io.respond_to?(:autoclose)
|
|
21
|
+
io.autoclose = false
|
|
22
|
+
else
|
|
23
|
+
hold(io)
|
|
24
|
+
end
|
|
19
25
|
io
|
|
20
26
|
end
|
|
21
27
|
|
data/lib/rubysh/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubysh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-12-
|
|
12
|
+
date: 2013-12-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -140,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
140
140
|
version: '0'
|
|
141
141
|
segments:
|
|
142
142
|
- 0
|
|
143
|
-
hash:
|
|
143
|
+
hash: 2837385941821063747
|
|
144
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
none: false
|
|
146
146
|
requirements:
|
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
149
149
|
version: '0'
|
|
150
150
|
segments:
|
|
151
151
|
- 0
|
|
152
|
-
hash:
|
|
152
|
+
hash: 2837385941821063747
|
|
153
153
|
requirements: []
|
|
154
154
|
rubyforge_project:
|
|
155
155
|
rubygems_version: 1.8.23
|