gir_ffi 0.12.0 → 0.12.1

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
  SHA256:
3
- metadata.gz: 878b55819cccfb1e47cee4e9e7c32f82f10fe6047a354f769099248a7f25ca50
4
- data.tar.gz: 7324795f3e9ef0427638b6b2cb3ed67a6a2a60daa9d56483173ec11a2198f3a7
3
+ metadata.gz: 4542b1c76addaf7e01bb9a6c8d7107d86ea0de3e898db45ed0e36692dd04f62f
4
+ data.tar.gz: 25a8bf9129747761c58a995b47bc2d191b7dba53b0a2e8009cbc2625335bc0fa
5
5
  SHA512:
6
- metadata.gz: e28e7c3a60c4957747a808edde2deb2b649b49e832206a32dd5ef655edcbe629081fd89b2cc442811f47e18fefbb0e24d825ef76b9b56b555f3f31afdd2a57ae
7
- data.tar.gz: aef306323a901033df3e1359318f52f44943a77100a03c20bbbc8e35b99389eb0fe3462ec01fd90c1c671c82a5b26136ed45876aeee7b482d05e329100ec8474
6
+ metadata.gz: a32e266d808fc123545e1ad23fa21f68263b51e73c2d9c3b7d0343097492ab434c55417ec2415273229509c973865e47a7d8a70855c863b30b2ea652ee401004
7
+ data.tar.gz: 96bf9543953553bb03ba2b087f970040e78e720b3608510e534354c1d74d11d86e08ef05cdd3f93b84d5342e19010455d9c3443ffe8dd0e04006658a5e2865ab
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
 
3
- ## 0.12.0 / 2018-03-024
3
+ ## 0.12.1 / 2018-05-20
4
+
5
+ * Restore support for Ruby 2.1 and 2.2
6
+
7
+ ## 0.12.0 / 2018-03-24
4
8
 
5
9
  * Drop support for GLib::IConv, which is no longer introspectable in glib 2.56.
6
10
  * Drop support for Ruby 2.1 and 2.2
@@ -18,7 +18,7 @@ module GLib
18
18
  end
19
19
 
20
20
  super(ptr).tap do |container|
21
- container&.reset_typespec typespec
21
+ container.reset_typespec typespec if container
22
22
  end
23
23
  end
24
24
 
@@ -36,7 +36,7 @@ module GObject
36
36
 
37
37
  result = rclosure.invoke_block(*args)
38
38
 
39
- return_value&.set_value(result)
39
+ return_value.set_value(result) if return_value
40
40
  end
41
41
 
42
42
  # @api private
@@ -125,7 +125,7 @@ module GirFFI
125
125
  end
126
126
 
127
127
  def length_argument_name
128
- length_arg&.post_converted_name
128
+ length_arg && length_arg.post_converted_name
129
129
  end
130
130
 
131
131
  def needs_size_check?
@@ -186,7 +186,7 @@ module GirFFI
186
186
  @arginfo.caller_allocates?
187
187
  end
188
188
 
189
- DESTROY_NOTIFIER = 'GLib::DestroyNotify.default'
189
+ DESTROY_NOTIFIER = 'GLib::DestroyNotify.default'.freeze
190
190
 
191
191
  def ingoing_convertor
192
192
  if skipped_in?
@@ -170,7 +170,7 @@ module GirFFI
170
170
  end
171
171
 
172
172
  def length_argument_name
173
- length_arg&.pre_converted_name
173
+ length_arg && length_arg.pre_converted_name
174
174
  end
175
175
  end
176
176
  end
@@ -39,7 +39,7 @@ module GirFFI
39
39
  end
40
40
 
41
41
  def length_argument_name
42
- length_arg&.post_converted_name
42
+ length_arg && length_arg.post_converted_name
43
43
  end
44
44
  end
45
45
  end
@@ -16,7 +16,7 @@ module GirFFI
16
16
 
17
17
  def find_instance_method(method)
18
18
  info = find_method method
19
- return info if info&.method?
19
+ return info if info && info.method?
20
20
  end
21
21
 
22
22
  def find_method(_method)
@@ -194,7 +194,7 @@ module GirFFI
194
194
  end
195
195
  end
196
196
 
197
- GOBJECT_VALUE_NAME = 'GObject::Value'
197
+ GOBJECT_VALUE_NAME = 'GObject::Value'.freeze
198
198
 
199
199
  def gvalue?
200
200
  argument_class_name == GOBJECT_VALUE_NAME
@@ -16,7 +16,7 @@ module GirFFI
16
16
  end
17
17
 
18
18
  def invoker_name
19
- invoker&.name
19
+ invoker && invoker.name
20
20
  end
21
21
 
22
22
  def has_invoker?
@@ -38,7 +38,7 @@ module GirFFI
38
38
  end
39
39
 
40
40
  def self.copy_from(val)
41
- val&.ref
41
+ val.ref if val
42
42
  end
43
43
 
44
44
  #
@@ -20,7 +20,7 @@ module GirFFI
20
20
  GObject.type_name g_type
21
21
  end
22
22
 
23
- DEFAULT_BOXED_NAMESPACE = 'GLib'
23
+ DEFAULT_BOXED_NAMESPACE = 'GLib'.freeze
24
24
 
25
25
  def namespace
26
26
  DEFAULT_BOXED_NAMESPACE
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Current GirFFI version
4
4
  module GirFFI
5
- VERSION = '0.12.0'
5
+ VERSION = '0.12.1'.freeze
6
6
  end
@@ -117,7 +117,7 @@ describe GirFFI::Builders::FieldBuilder do
117
117
  let(:n_params_field_info) { get_field_introspection_data 'GObject', 'SignalQuery', 'n_params' }
118
118
 
119
119
  it 'creates the right getter method' do
120
- skip if field_info.field_type.array_length.negative?
120
+ skip if field_info.field_type.array_length < 0
121
121
  expected = <<-CODE.reset_indentation
122
122
  def param_types
123
123
  _v1 = @struct.to_ptr + #{n_params_field_info.offset}
@@ -68,7 +68,7 @@ describe GObject do
68
68
 
69
69
  it 'uses the n_params field for the length of param_types' do
70
70
  field_info = get_field_introspection_data 'GObject', 'SignalQuery', 'param_types'
71
- skip if field_info.field_type.array_length.negative?
71
+ skip if field_info.field_type.array_length < 0
72
72
  gtype = GObject::Object.gtype
73
73
  signals = GObject.signal_list_ids gtype
74
74
  signal_query = GObject.signal_query signals.first
@@ -1219,7 +1219,7 @@ describe Regress do
1219
1219
  end
1220
1220
 
1221
1221
  it 'has non-zero positive result for #gtype' do
1222
- Regress::TestBoxed.gtype.must_be :positive?
1222
+ Regress::TestBoxed.gtype.must_be :>, 0
1223
1223
  end
1224
1224
 
1225
1225
  it 'has a working method #_not_a_method' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gir_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-24 00:00:00.000000000 Z
11
+ date: 2018-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -455,7 +455,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
455
455
  requirements:
456
456
  - - ">="
457
457
  - !ruby/object:Gem::Version
458
- version: 2.3.0
458
+ version: 2.1.0
459
459
  required_rubygems_version: !ruby/object:Gem::Requirement
460
460
  requirements:
461
461
  - - ">="