backports 2.6.6 → 2.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/backports/1.9.1/io.rb +7 -5
- data/lib/backports/version.rb +1 -1
- data/test/test_socket_interaction.rb +9 -0
- metadata +3 -1
data/lib/backports/1.9.1/io.rb
CHANGED
@@ -14,13 +14,15 @@ class IO
|
|
14
14
|
begin
|
15
15
|
File.open(__FILE__) { |f| IO.open(f.fileno, :mode => 'r').close }
|
16
16
|
rescue StandardError
|
17
|
-
def open_with_options_hash(
|
18
|
-
|
19
|
-
|
17
|
+
def open_with_options_hash(*args)
|
18
|
+
if args.size > 2 || args[1].is_a?(Hash)
|
19
|
+
fd, mode, options = (args << Backports::Undefined)
|
20
|
+
args = [fd, Backports.combine_mode_and_option(mode, options)]
|
21
|
+
end
|
20
22
|
if block_given?
|
21
|
-
open_without_options_hash(
|
23
|
+
open_without_options_hash(*args){|f| yield f}
|
22
24
|
else
|
23
|
-
open_without_options_hash(
|
25
|
+
open_without_options_hash(*args)
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
data/lib/backports/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- test/README
|
120
120
|
- test/std_lib_loading_test.rb
|
121
121
|
- test/test_helper.rb
|
122
|
+
- test/test_socket_interaction.rb
|
122
123
|
homepage: http://github.com/marcandre/backports
|
123
124
|
licenses: []
|
124
125
|
post_install_message:
|
@@ -147,4 +148,5 @@ test_files:
|
|
147
148
|
- test/README
|
148
149
|
- test/std_lib_loading_test.rb
|
149
150
|
- test/test_helper.rb
|
151
|
+
- test/test_socket_interaction.rb
|
150
152
|
has_rdoc:
|