psych 2.0.16-java → 2.0.17-java

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: 6f4110ab7047d2c3994b5bf979138b0b8dbc1df8
4
- data.tar.gz: bc958a3e425bc1725b46967c0c7bc1ebf02bcf02
3
+ metadata.gz: 9a5c4d910a52947718fe9c4e935a30110d1eef1f
4
+ data.tar.gz: 52a1a614265c7dbc09f1170fa6d8d4f9d67dd27b
5
5
  SHA512:
6
- metadata.gz: 4b841b4ac9cb6d5455f34ee0ed82004bbb8d4c354a08fa8b2de478714b503b82d072847db6bb4ed9508e566ae23a27e6ab5c9f34925c542028a01a65174d3bad
7
- data.tar.gz: 5c980e0ab8c7dbc86a695f55f868f47ab0b27ee7ed12494671de683588a7a0ed7aa02f8a7e6b1a79d9bab7f951a7edfb99821061e9316af60c8df82808bc3255
6
+ metadata.gz: da729662069374b214233bd5074a06168791e4a8582f9c3e1752b5dc887415d2d095364cd171e781b30bd330f27181f18a50bf75329e753b087ecd6c3ffbadc4
7
+ data.tar.gz: d332a0d3ab7924544ce6309156eff265843b1c795593b4ad8b48c0a65b688a4d3ba0d70de66534f40957824aec4a4eac92c65f5f3d834405c2eb7e9e996b3fa4
@@ -167,16 +167,18 @@ static VALUE start_document(VALUE self, VALUE version, VALUE tags, VALUE imp)
167
167
 
168
168
  if(RTEST(tags)) {
169
169
  long i = 0;
170
+ long len;
170
171
  #ifdef HAVE_RUBY_ENCODING_H
171
172
  rb_encoding * encoding = rb_utf8_encoding();
172
173
  #endif
173
174
 
174
175
  Check_Type(tags, T_ARRAY);
175
176
 
176
- head = xcalloc((size_t)RARRAY_LEN(tags), sizeof(yaml_tag_directive_t));
177
+ len = RARRAY_LEN(tags);
178
+ head = xcalloc((size_t)len, sizeof(yaml_tag_directive_t));
177
179
  tail = head;
178
180
 
179
- for(i = 0; i < RARRAY_LEN(tags); i++) {
181
+ for(i = 0; i < len && i < RARRAY_LEN(tags); i++) {
180
182
  VALUE tuple = RARRAY_AREF(tags, i);
181
183
  VALUE name;
182
184
  VALUE value;
@@ -189,13 +191,15 @@ static VALUE start_document(VALUE self, VALUE version, VALUE tags, VALUE imp)
189
191
  }
190
192
  name = RARRAY_AREF(tuple, 0);
191
193
  value = RARRAY_AREF(tuple, 1);
194
+ StringValue(name);
195
+ StringValue(value);
192
196
  #ifdef HAVE_RUBY_ENCODING_H
193
197
  name = rb_str_export_to_enc(name, encoding);
194
198
  value = rb_str_export_to_enc(value, encoding);
195
199
  #endif
196
200
 
197
- tail->handle = (yaml_char_t *)StringValuePtr(name);
198
- tail->prefix = (yaml_char_t *)StringValuePtr(value);
201
+ tail->handle = (yaml_char_t *)RSTRING_PTR(name);
202
+ tail->prefix = (yaml_char_t *)RSTRING_PTR(value);
199
203
 
200
204
  tail++;
201
205
  }
Binary file
@@ -223,7 +223,7 @@ require 'psych/class_loader'
223
223
 
224
224
  module Psych
225
225
  # The version is Psych you're using
226
- VERSION = '2.0.16'
226
+ VERSION = '2.0.17'
227
227
 
228
228
  # The version of libyaml Psych is using
229
229
  LIBYAML_VERSION = Psych.libyaml_version.join '.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psych
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.16
4
+ version: 2.0.17
5
5
  platform: java
6
6
  authors:
7
7
  - Aaron Patterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2016-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jar-dependencies