stopgap_13632 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81bd4ffcb8a265623265fe33484ccd2a9d415f16
4
- data.tar.gz: c122f750f0165ef2d81f83708dba1132333e428c
3
+ metadata.gz: 8dd690244ac94df39f99d5f37839993514c1a22a
4
+ data.tar.gz: 6dc6e88bf9e6b59681dc18acb1f34f9898136fb1
5
5
  SHA512:
6
- metadata.gz: 2580b78b22c5ae556a5bd2a5c4a7c287dec486d8a1c6018a080b413d48c201c41e47a0bfffd553792fc7822aa71110c38aba8c3c8e64d752345c632c7936e251
7
- data.tar.gz: 64ac8ac8b8498168936405ac93bd4669ce80da56840dea401aa7ebcaf6d457f0f0039033fa8e02dc527ac5c7e43740efa2aa80b74070319693f5f9714fe3cfb7
6
+ metadata.gz: 2f7b5875dd88e3c90c4c56a4c09e9de999175f4c6a028d437053c5f386c014d75cdd9d1caa293304ef9e70c322849c1667502d1bad69cda64a99cc51d9a20fb4
7
+ data.tar.gz: 7212f1dcf74210903f3eb8100ba593d7cbea65c067ea7976be2e153fd53d6af24c69d07c279983a455cfa86c37bde253d535ad9f9f80160f957488d71b8f3fe4
@@ -6,5 +6,6 @@ branches:
6
6
  only: [master]
7
7
  rvm:
8
8
  - 2.2.7
9
+ - 2.2.8
9
10
  - 2.3.4
10
11
  - 2.4.1
data/README.md CHANGED
@@ -2,18 +2,31 @@
2
2
  [![Build Status](https://ci.appveyor.com/api/projects/status/cqgu4tce6of44c9x?svg=true)](https://ci.appveyor.com/api/projects/status/cqgu4tce6of44c9x?svg=true)
3
3
 
4
4
  ## Description
5
- A gem with a temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until the proper fix gets backported.
6
- No other version besides mentioned 3 are affected.
5
+ A gem with a temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.2.8, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until the proper fix gets backported.
6
+ No other versions besides those 4 are affected.
7
7
  The mentioned versions are currently most recent ones.
8
8
 
9
- ## Installation
9
+ ## How does this bug look?
10
+ You're getting a similar exception erratically in a presence of many threads:
10
11
  ```ruby
11
- gem install stopgap_13632
12
- require 'stopgap_13632'
12
+ Traceback (most recent call last):
13
+ 1: from test2.rb:9:in `block (2 levels) in <main>'
14
+ test2.rb:9:in `sysopen': stream closed in another thread (IOError)
13
15
  ```
14
16
 
15
- ## Usage
16
- And when an "IOError: stream closed" happens in a thread, accessing a busy IO:
17
+ ## Installation and usage
18
+ In Gemfile:
19
+ ```ruby
20
+ if %w(2.2.7 2.2.8 2.3.4 2.4.1).include? RUBY_VERSION
21
+ gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"]
22
+ end
23
+
24
+ ```
25
+ Don't forget to require it:
26
+ ```
27
+ require 'stopgap_13632'
28
+ ```
29
+ And when an "IOError: stream closed" happens in a thread, accessing a busy IO, catch it and call the following method:
17
30
  ```
18
31
  rescue IOError
19
32
  Thread.current.purge_interrupt_queue
@@ -4,7 +4,7 @@ extension_name = 'stopgap_13632'
4
4
 
5
5
  dir_config(extension_name)
6
6
 
7
- BROKEN_VERSIONS = %w(2.2.7 2.3.4 2.4.1)
7
+ BROKEN_VERSIONS = %w(2.2.7 2.2.8 2.3.4 2.4.1)
8
8
  if (BROKEN_VERSIONS.include? RUBY_VERSION)
9
9
  $defs << '-DBROKEN_RUBY'
10
10
  $defs << "-DVERSION_#{RUBY_VERSION.gsub('.', '_')}"
@@ -43,7 +43,7 @@ typedef struct half_thread {
43
43
  void *top_self;
44
44
  void *top_wrapper;
45
45
  #ifndef VERSION_2_4_1
46
- void *base_block;
46
+ void *base_block;
47
47
  #endif
48
48
  void *root_lep;
49
49
  void *root_svar;
@@ -58,7 +58,7 @@ typedef struct half_thread {
58
58
  void *interrupt_event;
59
59
  #elif defined(HAVE_PTHREAD_H)
60
60
  void *ubf_list1_or_signal_thread_list;
61
- #ifndef VERSION_2_2_7
61
+ #if defined(VERSION_2_3_4) && defined(VERSION_2_4_1)
62
62
  void *ubf_list2;
63
63
  #endif
64
64
  pthread_cond_t cond;
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'stopgap_13632'
3
- s.version = '1.0.1'
3
+ s.version = '1.1.0'
4
4
  s.authors = ['Nikolay Vashchenko']
5
- s.description = 'Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported'
5
+ s.description = 'Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.2.8, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported'
6
6
  s.summary = 'Temporary solution for https://bugs.ruby-lang.org/issues/13632'
7
7
  s.email = 'sir.nickolas@gmail.com'
8
8
  s.extensions = ['ext/stopgap_13632/extconf.rb']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stopgap_13632
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikolay Vashchenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-19 00:00:00.000000000 Z
11
+ date: 2017-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -38,8 +38,8 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.8'
41
- description: Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.3.4, 2.4.1
42
- for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported
41
+ description: Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.2.8, 2.3.4,
42
+ 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported
43
43
  email: sir.nickolas@gmail.com
44
44
  executables: []
45
45
  extensions:
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.6.11
84
+ rubygems_version: 2.4.5.3
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Temporary solution for https://bugs.ruby-lang.org/issues/13632