pg_query 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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGViZWIzN2Y1NDNmNTAzZjIxZGZhZjQ4Nzc1OGIwOTk1MTYxNDcwYw==
4
+ OTQ5MzZjYzgxYTIxZGQ3MWU3N2ZiYzFlMzI5MDhmOTZjMmFjZDQ5ZQ==
5
5
  data.tar.gz: !binary |-
6
- OTBlNDllYmE5YmQ4YmJiM2Q4NGFiMjMxYWM4NjBhNmZmNTI4YmMxNg==
6
+ MzIwNTk4ODI3OWRjODA4MjI2ZWQxOGUyMjM1NGJjMGM5MzRlYmI3YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjExZGE0MWM0YWM1YzIxMzIxOThiMGFiOGJkYTMyYTMyY2ViZTY2MzRlNTgw
10
- YzFlYjAyYzUxZDc4NzkxNWQ2ZTdlYzhhMmUyNzhiZDk0NTlhYmJiZGUwOGI4
11
- MGUyMDFlNTdmYTczMGQzOGU4MDJhNTNhODU4YWJhYmFkZDI2ZWE=
9
+ ZTk5YzFhZmQyZjRkZTIwNDdhNDExMWViNzQwYjI1NDBlOGQyNzk1ZTE2MzRh
10
+ OTlmNTQ3ZTc5MDRjNDQ4ZDRkMWVkOWZjMzY1MmZhMDUzZWM4YTM0NDZmODIw
11
+ MDNkMDQ0ZmM1NzgzYzYwODFlZmRjZDk3ODQyZWMyM2Q2YjgwN2U=
12
12
  data.tar.gz: !binary |-
13
- YTIyNTcxZDkwNDBjOGI0YjkxYjg0MjY2ZjJlYzMzNTQwZGU2NGI3MzFlZDc0
14
- YjZhZGU1NzlmZWJlNDdiN2VlNDY5NWRlNDQ4NmVhYjBkZDllMGRhNjliMGEz
15
- OTRlOGQ1NGRlYzU3NWMyMmY4MzYxMzQwM2Y0Y2Y5NzljYTYwYjI=
13
+ Nzk0NTY3MjE2NDE2OTZhOWYxNzAwOTNlZjE1Njk0MDdhNGYxNjU5NTgyZjI0
14
+ ODhmYjQyZGMzN2ZlYTk4ZGY2OGZhYjMwNjU0YjhkYjJkYWFmNGNiZmU1NDVk
15
+ MjY4Yzc2Y2E3NjRjYzA2MmEzNjg3NTkwZjA2MDBlMmIxMWQ1YmQ=
@@ -48,7 +48,7 @@ static VALUE pg_query_raw_parse(VALUE self, VALUE input)
48
48
 
49
49
  // Setup pipe for stderr redirection
50
50
  if (pipe(stderr_pipe) != 0)
51
- rb_raise(rb_eRuntimeError, "PgQuery._raw_parse: Could not allocate pipe for stderr redirection");
51
+ rb_raise(rb_eIOError, "Failed to open pipe, too many open file descriptors");
52
52
 
53
53
  fcntl(stderr_pipe[0], F_SETFL, fcntl(stderr_pipe[0], F_GETFL) | O_NONBLOCK);
54
54
 
@@ -84,8 +84,9 @@ static VALUE pg_query_raw_parse(VALUE self, VALUE input)
84
84
  }
85
85
  PG_END_TRY();
86
86
 
87
- // Restore stderr & return to previous PostgreSQL memory context
87
+ // Restore stderr, close pipe & return to previous PostgreSQL memory context
88
88
  dup2(stderr_global, STDERR_FILENO);
89
+ close(stderr_pipe[0]);
89
90
  MemoryContextSwitchTo(TopMemoryContext);
90
91
  MemoryContextDelete(ctx);
91
92
 
@@ -1,3 +1,3 @@
1
1
  class PgQuery
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Fittl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-12 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler