ffi-win32-extensions 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: e5acf291b33091d04112998904383526358c6d9f
4
- data.tar.gz: 77236d03797f75178af185497a584b9d2c2fe0f7
3
+ metadata.gz: a61a497ca132d28a6d17298a8551281955678458
4
+ data.tar.gz: 3976608e5b17ee479765ab737c8d7576e21236b0
5
5
  SHA512:
6
- metadata.gz: f5c499dc8e3c88802d8d9f87ef3adb375fb2124aee916fb0767a600b05d12e61d0d102088c5ed54a10c6e83fe35f1c36eb32757a5b61e1b819f987f9fa707835
7
- data.tar.gz: 80be12ecb287a4557985c3796c0753aec200c63894535acb13dbb5fbabd1fa224275ef90071e30a0ece37ac08edbb6af6fbe6f570dd4a241a6016bd94d5b2195
6
+ metadata.gz: 1518bab2ccbc0114d46edfb17b96461c25b4747c556f9287213776b06899c30526db0106347841086fc4da8980919cf10a12252431c396484f497d3a0baf5fc0
7
+ data.tar.gz: 27048b83b513b98bc6a7fb33a8569d32cb84ed3416d5f26fdab677c57050f1b720fcbaefc7d7a5e32c404d76a94b7b6f23c0743c7ef2a76afb3844b1e44b753c
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGES CHANGED
@@ -1,2 +1,5 @@
1
+ = 1.0.1 - 8-May-2016
2
+ * The String#wstrip method defaults to nil on failure.
3
+
1
4
  = 1.0.0 - 7-May-2016
2
5
  * Initial release
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'ffi-win32-extensions'
5
- spec.version = '1.0.0'
5
+ spec.version = '1.0.1'
6
6
  spec.authors = 'Daniel J. Berger'
7
7
  spec.license = 'Apache 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -70,10 +70,13 @@ class String
70
70
  end
71
71
 
72
72
  # Read a wide character string up until the first double null, and delete
73
- # any remaining null characters.
73
+ # any remaining null characters. If this fails (typically because there
74
+ # are only null characters) then nil is returned instead.
74
75
  #
75
76
  def wstrip
76
77
  self.force_encoding('UTF-16LE').encode('UTF-8', :invalid=>:replace, :undef=>:replace).
77
78
  split("\x00")[0].encode(Encoding.default_external)
79
+ rescue
80
+ nil
78
81
  end
79
82
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-win32-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -30,7 +30,7 @@ cert_chain:
30
30
  EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
31
31
  tGSHgAmcLlkdGgan182qsE/4kKM=
32
32
  -----END CERTIFICATE-----
33
- date: 2016-05-07 00:00:00.000000000 Z
33
+ date: 2016-05-08 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: ffi
metadata.gz.sig CHANGED
Binary file