psych 2.2.0-java → 2.2.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -0
- data/Rakefile +3 -1
- data/ext/psych/psych.h +0 -3
- data/ext/psych/psych_emitter.c +6 -22
- data/ext/psych/psych_parser.c +0 -29
- data/ext/psych/psych_to_ruby.c +0 -4
- data/ext/psych/yaml/emitter.c +4 -4
- data/ext/psych/yaml/parser.c +1 -1
- data/ext/psych/yaml/reader.c +3 -3
- data/ext/psych/yaml/scanner.c +6 -6
- data/ext/psych/yaml/writer.c +1 -1
- data/lib/psych.rb +1 -3
- data/lib/psych/versions.rb +6 -1
- data/lib/psych_jars.rb +0 -1
- data/psych.gemspec +8 -6
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b4abaedecb21703f73add798b6dec33287c62eb
|
4
|
+
data.tar.gz: e96b021dfca8edb466f52e2044ae36eb851256cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1052fbfc6c835d820f802d4df316dbf28d690f1f49b0d42a74ea7f04d6de09930e609d41767d39cce9fa82f48af00d57204bc005cf0530fb61166bec56cccf6a
|
7
|
+
data.tar.gz: 5dc998f128e535dfb29bd21864b6759b60a41f592174d248b804bb2fb7ecc573335d34489224f47fb685f9947161931f19cfa5bba84165dc579bb3c930a9f573
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
$LOAD_PATH.unshift './lib'
|
2
|
+
load 'psych/versions.rb'
|
1
3
|
require "bundler/gem_tasks"
|
2
4
|
require "rake/testtask"
|
3
5
|
|
@@ -15,7 +17,7 @@ if RUBY_PLATFORM =~ /java/
|
|
15
17
|
# and tell maven via system properties the snakeyaml version
|
16
18
|
# this is basically the same as running from the commandline:
|
17
19
|
# rmvn dependency:build-classpath -Dsnakeyaml.version='use version from Psych::DEFAULT_SNAKEYAML_VERSION here'
|
18
|
-
Maven::Ruby::Maven.new.exec(
|
20
|
+
Maven::Ruby::Maven.new.exec('dependency:build-classpath', "-Dsnakeyaml.version=#{Psych::DEFAULT_SNAKEYAML_VERSION}", '-Dverbose=true')
|
19
21
|
ext.source_version = '1.7'
|
20
22
|
ext.target_version = '1.7'
|
21
23
|
ext.classpath = File.read('pkg/classpath')
|
data/ext/psych/psych.h
CHANGED
data/ext/psych/psych_emitter.c
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
#endif
|
9
9
|
|
10
10
|
VALUE cPsychEmitter;
|
11
|
+
static ID id_io;
|
11
12
|
static ID id_write;
|
12
13
|
static ID id_line_width;
|
13
14
|
static ID id_indentation;
|
@@ -21,12 +22,8 @@ static void emit(yaml_emitter_t * emitter, yaml_event_t * event)
|
|
21
22
|
|
22
23
|
static int writer(void *ctx, unsigned char *buffer, size_t size)
|
23
24
|
{
|
24
|
-
VALUE
|
25
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
25
|
+
VALUE self = (VALUE)ctx, io = rb_attr_get(self, id_io);
|
26
26
|
VALUE str = rb_enc_str_new((const char *)buffer, (long)size, rb_utf8_encoding());
|
27
|
-
#else
|
28
|
-
VALUE str = rb_str_new((const char *)buffer, (long)size);
|
29
|
-
#endif
|
30
27
|
VALUE wrote = rb_funcall(io, id_write, 1, str);
|
31
28
|
return (int)NUM2INT(wrote);
|
32
29
|
}
|
@@ -94,7 +91,8 @@ static VALUE initialize(int argc, VALUE *argv, VALUE self)
|
|
94
91
|
yaml_emitter_set_canonical(emitter, Qtrue == canonical ? 1 : 0);
|
95
92
|
}
|
96
93
|
|
97
|
-
|
94
|
+
rb_ivar_set(self, id_io, io);
|
95
|
+
yaml_emitter_set_output(emitter, writer, (void *)self);
|
98
96
|
|
99
97
|
return self;
|
100
98
|
}
|
@@ -168,9 +166,7 @@ static VALUE start_document(VALUE self, VALUE version, VALUE tags, VALUE imp)
|
|
168
166
|
if(RTEST(tags)) {
|
169
167
|
long i = 0;
|
170
168
|
long len;
|
171
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
172
169
|
rb_encoding * encoding = rb_utf8_encoding();
|
173
|
-
#endif
|
174
170
|
|
175
171
|
Check_Type(tags, T_ARRAY);
|
176
172
|
|
@@ -193,10 +189,8 @@ static VALUE start_document(VALUE self, VALUE version, VALUE tags, VALUE imp)
|
|
193
189
|
value = RARRAY_AREF(tuple, 1);
|
194
190
|
StringValue(name);
|
195
191
|
StringValue(value);
|
196
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
197
192
|
name = rb_str_export_to_enc(name, encoding);
|
198
193
|
value = rb_str_export_to_enc(value, encoding);
|
199
|
-
#endif
|
200
194
|
|
201
195
|
tail->handle = (yaml_char_t *)RSTRING_PTR(name);
|
202
196
|
tail->prefix = (yaml_char_t *)RSTRING_PTR(value);
|
@@ -257,14 +251,11 @@ static VALUE scalar(
|
|
257
251
|
) {
|
258
252
|
yaml_emitter_t * emitter;
|
259
253
|
yaml_event_t event;
|
260
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
261
254
|
rb_encoding *encoding;
|
262
|
-
#endif
|
263
255
|
TypedData_Get_Struct(self, yaml_emitter_t, &psych_emitter_type, emitter);
|
264
256
|
|
265
257
|
Check_Type(value, T_STRING);
|
266
258
|
|
267
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
268
259
|
encoding = rb_utf8_encoding();
|
269
260
|
|
270
261
|
value = rb_str_export_to_enc(value, encoding);
|
@@ -278,7 +269,6 @@ static VALUE scalar(
|
|
278
269
|
Check_Type(tag, T_STRING);
|
279
270
|
tag = rb_str_export_to_enc(tag, encoding);
|
280
271
|
}
|
281
|
-
#endif
|
282
272
|
|
283
273
|
yaml_scalar_event_initialize(
|
284
274
|
&event,
|
@@ -313,7 +303,6 @@ static VALUE start_sequence(
|
|
313
303
|
yaml_emitter_t * emitter;
|
314
304
|
yaml_event_t event;
|
315
305
|
|
316
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
317
306
|
rb_encoding * encoding = rb_utf8_encoding();
|
318
307
|
|
319
308
|
if(!NIL_P(anchor)) {
|
@@ -325,7 +314,6 @@ static VALUE start_sequence(
|
|
325
314
|
Check_Type(tag, T_STRING);
|
326
315
|
tag = rb_str_export_to_enc(tag, encoding);
|
327
316
|
}
|
328
|
-
#endif
|
329
317
|
|
330
318
|
TypedData_Get_Struct(self, yaml_emitter_t, &psych_emitter_type, emitter);
|
331
319
|
|
@@ -377,12 +365,10 @@ static VALUE start_mapping(
|
|
377
365
|
) {
|
378
366
|
yaml_emitter_t * emitter;
|
379
367
|
yaml_event_t event;
|
380
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
381
368
|
rb_encoding *encoding;
|
382
|
-
|
369
|
+
|
383
370
|
TypedData_Get_Struct(self, yaml_emitter_t, &psych_emitter_type, emitter);
|
384
371
|
|
385
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
386
372
|
encoding = rb_utf8_encoding();
|
387
373
|
|
388
374
|
if(!NIL_P(anchor)) {
|
@@ -394,7 +380,6 @@ static VALUE start_mapping(
|
|
394
380
|
Check_Type(tag, T_STRING);
|
395
381
|
tag = rb_str_export_to_enc(tag, encoding);
|
396
382
|
}
|
397
|
-
#endif
|
398
383
|
|
399
384
|
yaml_mapping_start_event_initialize(
|
400
385
|
&event,
|
@@ -440,12 +425,10 @@ static VALUE alias(VALUE self, VALUE anchor)
|
|
440
425
|
yaml_event_t event;
|
441
426
|
TypedData_Get_Struct(self, yaml_emitter_t, &psych_emitter_type, emitter);
|
442
427
|
|
443
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
444
428
|
if(!NIL_P(anchor)) {
|
445
429
|
Check_Type(anchor, T_STRING);
|
446
430
|
anchor = rb_str_export_to_enc(anchor, rb_utf8_encoding());
|
447
431
|
}
|
448
|
-
#endif
|
449
432
|
|
450
433
|
yaml_alias_event_initialize(
|
451
434
|
&event,
|
@@ -562,6 +545,7 @@ void Init_psych_emitter(void)
|
|
562
545
|
rb_define_method(cPsychEmitter, "line_width", line_width, 0);
|
563
546
|
rb_define_method(cPsychEmitter, "line_width=", set_line_width, 1);
|
564
547
|
|
548
|
+
id_io = rb_intern("io");
|
565
549
|
id_write = rb_intern("write");
|
566
550
|
id_line_width = rb_intern("line_width");
|
567
551
|
id_indentation = rb_intern("indentation");
|
data/ext/psych/psych_parser.c
CHANGED
@@ -93,7 +93,6 @@ static VALUE make_exception(yaml_parser_t * parser, VALUE path)
|
|
93
93
|
parser->context ? rb_usascii_str_new2(parser->context) : Qnil);
|
94
94
|
}
|
95
95
|
|
96
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
97
96
|
static VALUE transcode_string(VALUE src, int * parser_encoding)
|
98
97
|
{
|
99
98
|
int utf8 = rb_utf8_encindex();
|
@@ -171,8 +170,6 @@ static VALUE transcode_io(VALUE src, int * parser_encoding)
|
|
171
170
|
return src;
|
172
171
|
}
|
173
172
|
|
174
|
-
#endif
|
175
|
-
|
176
173
|
static VALUE protected_start_stream(VALUE pointer)
|
177
174
|
{
|
178
175
|
VALUE *args = (VALUE *)pointer;
|
@@ -253,10 +250,8 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
253
250
|
int tainted = 0;
|
254
251
|
int state = 0;
|
255
252
|
int parser_encoding = YAML_ANY_ENCODING;
|
256
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
257
253
|
int encoding = rb_utf8_encindex();
|
258
254
|
rb_encoding * internal_enc = rb_default_internal_encoding();
|
259
|
-
#endif
|
260
255
|
VALUE handler = rb_iv_get(self, "@handler");
|
261
256
|
|
262
257
|
if (rb_scan_args(argc, argv, "11", &yaml, &path) == 1) {
|
@@ -274,18 +269,14 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
274
269
|
if (OBJ_TAINTED(yaml)) tainted = 1;
|
275
270
|
|
276
271
|
if (rb_respond_to(yaml, id_read)) {
|
277
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
278
272
|
yaml = transcode_io(yaml, &parser_encoding);
|
279
273
|
yaml_parser_set_encoding(parser, parser_encoding);
|
280
|
-
#endif
|
281
274
|
yaml_parser_set_input(parser, io_reader, (void *)yaml);
|
282
275
|
if (RTEST(rb_obj_is_kind_of(yaml, rb_cIO))) tainted = 1;
|
283
276
|
} else {
|
284
277
|
StringValue(yaml);
|
285
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
286
278
|
yaml = transcode_string(yaml, &parser_encoding);
|
287
279
|
yaml_parser_set_encoding(parser, parser_encoding);
|
288
|
-
#endif
|
289
280
|
yaml_parser_set_input_string(
|
290
281
|
parser,
|
291
282
|
(const unsigned char *)RSTRING_PTR(yaml),
|
@@ -338,17 +329,13 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
338
329
|
if(start->handle) {
|
339
330
|
handle = rb_str_new2((const char *)start->handle);
|
340
331
|
if (tainted) OBJ_TAINT(handle);
|
341
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
342
332
|
PSYCH_TRANSCODE(handle, encoding, internal_enc);
|
343
|
-
#endif
|
344
333
|
}
|
345
334
|
|
346
335
|
if(start->prefix) {
|
347
336
|
prefix = rb_str_new2((const char *)start->prefix);
|
348
337
|
if (tainted) OBJ_TAINT(prefix);
|
349
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
350
338
|
PSYCH_TRANSCODE(prefix, encoding, internal_enc);
|
351
|
-
#endif
|
352
339
|
}
|
353
340
|
|
354
341
|
rb_ary_push(tag_directives, rb_ary_new3((long)2, handle, prefix));
|
@@ -377,9 +364,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
377
364
|
if(event.data.alias.anchor) {
|
378
365
|
alias = rb_str_new2((const char *)event.data.alias.anchor);
|
379
366
|
if (tainted) OBJ_TAINT(alias);
|
380
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
381
367
|
PSYCH_TRANSCODE(alias, encoding, internal_enc);
|
382
|
-
#endif
|
383
368
|
}
|
384
369
|
|
385
370
|
args[0] = handler;
|
@@ -399,24 +384,18 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
399
384
|
);
|
400
385
|
if (tainted) OBJ_TAINT(val);
|
401
386
|
|
402
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
403
387
|
PSYCH_TRANSCODE(val, encoding, internal_enc);
|
404
|
-
#endif
|
405
388
|
|
406
389
|
if(event.data.scalar.anchor) {
|
407
390
|
anchor = rb_str_new2((const char *)event.data.scalar.anchor);
|
408
391
|
if (tainted) OBJ_TAINT(anchor);
|
409
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
410
392
|
PSYCH_TRANSCODE(anchor, encoding, internal_enc);
|
411
|
-
#endif
|
412
393
|
}
|
413
394
|
|
414
395
|
if(event.data.scalar.tag) {
|
415
396
|
tag = rb_str_new2((const char *)event.data.scalar.tag);
|
416
397
|
if (tainted) OBJ_TAINT(tag);
|
417
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
418
398
|
PSYCH_TRANSCODE(tag, encoding, internal_enc);
|
419
|
-
#endif
|
420
399
|
}
|
421
400
|
|
422
401
|
plain_implicit =
|
@@ -446,18 +425,14 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
446
425
|
if(event.data.sequence_start.anchor) {
|
447
426
|
anchor = rb_str_new2((const char *)event.data.sequence_start.anchor);
|
448
427
|
if (tainted) OBJ_TAINT(anchor);
|
449
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
450
428
|
PSYCH_TRANSCODE(anchor, encoding, internal_enc);
|
451
|
-
#endif
|
452
429
|
}
|
453
430
|
|
454
431
|
tag = Qnil;
|
455
432
|
if(event.data.sequence_start.tag) {
|
456
433
|
tag = rb_str_new2((const char *)event.data.sequence_start.tag);
|
457
434
|
if (tainted) OBJ_TAINT(tag);
|
458
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
459
435
|
PSYCH_TRANSCODE(tag, encoding, internal_enc);
|
460
|
-
#endif
|
461
436
|
}
|
462
437
|
|
463
438
|
implicit =
|
@@ -486,17 +461,13 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
|
|
486
461
|
if(event.data.mapping_start.anchor) {
|
487
462
|
anchor = rb_str_new2((const char *)event.data.mapping_start.anchor);
|
488
463
|
if (tainted) OBJ_TAINT(anchor);
|
489
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
490
464
|
PSYCH_TRANSCODE(anchor, encoding, internal_enc);
|
491
|
-
#endif
|
492
465
|
}
|
493
466
|
|
494
467
|
if(event.data.mapping_start.tag) {
|
495
468
|
tag = rb_str_new2((const char *)event.data.mapping_start.tag);
|
496
469
|
if (tainted) OBJ_TAINT(tag);
|
497
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
498
470
|
PSYCH_TRANSCODE(tag, encoding, internal_enc);
|
499
|
-
#endif
|
500
471
|
}
|
501
472
|
|
502
473
|
implicit =
|
data/ext/psych/psych_to_ruby.c
CHANGED
@@ -21,11 +21,7 @@ static VALUE build_exception(VALUE self, VALUE klass, VALUE mesg)
|
|
21
21
|
*/
|
22
22
|
static VALUE path2class(VALUE self, VALUE path)
|
23
23
|
{
|
24
|
-
#ifdef HAVE_RUBY_ENCODING_H
|
25
24
|
return rb_path_to_class(path);
|
26
|
-
#else
|
27
|
-
return rb_path2class(StringValuePtr(path));
|
28
|
-
#endif
|
29
25
|
}
|
30
26
|
|
31
27
|
void Init_psych_to_ruby(void)
|
data/ext/psych/yaml/emitter.c
CHANGED
@@ -517,7 +517,7 @@ yaml_emitter_emit_stream_start(yaml_emitter_t *emitter,
|
|
517
517
|
if (emitter->best_width < 0) {
|
518
518
|
emitter->best_width = INT_MAX;
|
519
519
|
}
|
520
|
-
|
520
|
+
|
521
521
|
if (!emitter->line_break) {
|
522
522
|
emitter->line_break = YAML_LN_BREAK;
|
523
523
|
}
|
@@ -607,7 +607,7 @@ yaml_emitter_emit_document_start(yaml_emitter_t *emitter,
|
|
607
607
|
if (!yaml_emitter_write_indent(emitter))
|
608
608
|
return 0;
|
609
609
|
}
|
610
|
-
|
610
|
+
|
611
611
|
if (event->data.document_start.tag_directives.start
|
612
612
|
!= event->data.document_start.tag_directives.end) {
|
613
613
|
implicit = 0;
|
@@ -721,7 +721,7 @@ yaml_emitter_emit_document_end(yaml_emitter_t *emitter,
|
|
721
721
|
}
|
722
722
|
|
723
723
|
/*
|
724
|
-
*
|
724
|
+
*
|
725
725
|
* Expect a flow item node.
|
726
726
|
*/
|
727
727
|
|
@@ -1402,7 +1402,7 @@ yaml_emitter_analyze_anchor(yaml_emitter_t *emitter,
|
|
1402
1402
|
{
|
1403
1403
|
size_t anchor_length;
|
1404
1404
|
yaml_string_t string;
|
1405
|
-
|
1405
|
+
|
1406
1406
|
anchor_length = strlen((char *)anchor);
|
1407
1407
|
STRING_ASSIGN(string, anchor, anchor_length);
|
1408
1408
|
|
data/ext/psych/yaml/parser.c
CHANGED
@@ -1295,7 +1295,7 @@ yaml_parser_process_directives(yaml_parser_t *parser,
|
|
1295
1295
|
token = PEEK_TOKEN(parser);
|
1296
1296
|
if (!token) goto error;
|
1297
1297
|
}
|
1298
|
-
|
1298
|
+
|
1299
1299
|
for (default_tag_directive = default_tag_directives;
|
1300
1300
|
default_tag_directive->handle; default_tag_directive++) {
|
1301
1301
|
if (!yaml_parser_append_tag_directive(parser, *default_tag_directive, 1,
|
data/ext/psych/yaml/reader.c
CHANGED
@@ -52,7 +52,7 @@ yaml_parser_determine_encoding(yaml_parser_t *parser)
|
|
52
52
|
{
|
53
53
|
/* Ensure that we had enough bytes in the raw buffer. */
|
54
54
|
|
55
|
-
while (!parser->eof
|
55
|
+
while (!parser->eof
|
56
56
|
&& parser->raw_buffer.last - parser->raw_buffer.pointer < 3) {
|
57
57
|
if (!yaml_parser_update_raw_buffer(parser)) {
|
58
58
|
return 0;
|
@@ -295,7 +295,7 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length)
|
|
295
295
|
parser->offset, value);
|
296
296
|
|
297
297
|
break;
|
298
|
-
|
298
|
+
|
299
299
|
case YAML_UTF16LE_ENCODING:
|
300
300
|
case YAML_UTF16BE_ENCODING:
|
301
301
|
|
@@ -318,7 +318,7 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length)
|
|
318
318
|
*
|
319
319
|
* The following formulas are used for decoding
|
320
320
|
* and encoding characters using surrogate pairs:
|
321
|
-
*
|
321
|
+
*
|
322
322
|
* U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF)
|
323
323
|
* U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF)
|
324
324
|
* W1 = 110110yyyyyyyyyy
|
data/ext/psych/yaml/scanner.c
CHANGED
@@ -70,7 +70,7 @@
|
|
70
70
|
* %TAG !yaml! tag:yaml.org,2002:
|
71
71
|
* ---
|
72
72
|
*
|
73
|
-
* The
|
73
|
+
* The corresponding sequence of tokens:
|
74
74
|
*
|
75
75
|
* STREAM-START(utf-8)
|
76
76
|
* VERSION-DIRECTIVE(1,1)
|
@@ -762,7 +762,7 @@ yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token)
|
|
762
762
|
}
|
763
763
|
|
764
764
|
/* Fetch the next token from the queue. */
|
765
|
-
|
765
|
+
|
766
766
|
*token = DEQUEUE(parser, parser->tokens);
|
767
767
|
parser->token_available = 0;
|
768
768
|
parser->tokens_parsed ++;
|
@@ -1114,7 +1114,7 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
|
|
1114
1114
|
yaml_simple_key_t simple_key;
|
1115
1115
|
simple_key.possible = 1;
|
1116
1116
|
simple_key.required = required;
|
1117
|
-
simple_key.token_number =
|
1117
|
+
simple_key.token_number =
|
1118
1118
|
parser->tokens_parsed + (parser->tokens.tail - parser->tokens.head);
|
1119
1119
|
simple_key.mark = parser->mark;
|
1120
1120
|
|
@@ -1200,7 +1200,7 @@ yaml_parser_decrease_flow_level(yaml_parser_t *parser)
|
|
1200
1200
|
* Push the current indentation level to the stack and set the new level
|
1201
1201
|
* the current column is greater than the indentation level. In this case,
|
1202
1202
|
* append or insert the specified token into the token queue.
|
1203
|
-
*
|
1203
|
+
*
|
1204
1204
|
*/
|
1205
1205
|
|
1206
1206
|
static int
|
@@ -1938,7 +1938,7 @@ yaml_parser_scan_to_next_token(yaml_parser_t *parser)
|
|
1938
1938
|
*
|
1939
1939
|
* - in the flow context;
|
1940
1940
|
* - in the block context, but not at the beginning of the line or
|
1941
|
-
* after '-', '?', or ':' (complex value).
|
1941
|
+
* after '-', '?', or ':' (complex value).
|
1942
1942
|
*/
|
1943
1943
|
|
1944
1944
|
if (!CACHE(parser, 1)) return 0;
|
@@ -3007,7 +3007,7 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
|
|
3007
3007
|
*indent = 1;
|
3008
3008
|
}
|
3009
3009
|
|
3010
|
-
return 1;
|
3010
|
+
return 1;
|
3011
3011
|
}
|
3012
3012
|
|
3013
3013
|
/*
|
data/ext/psych/yaml/writer.c
CHANGED
data/lib/psych.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
|
+
require 'psych/versions'
|
2
3
|
case RUBY_ENGINE
|
3
4
|
when 'jruby'
|
4
5
|
require 'psych_jars'
|
@@ -223,9 +224,6 @@ require 'psych/class_loader'
|
|
223
224
|
# # => "a"
|
224
225
|
|
225
226
|
module Psych
|
226
|
-
# The version is Psych you're using
|
227
|
-
VERSION = '2.1.1'
|
228
|
-
|
229
227
|
# The version of libyaml Psych is using
|
230
228
|
LIBYAML_VERSION = Psych.libyaml_version.join '.'
|
231
229
|
|
data/lib/psych/versions.rb
CHANGED
data/lib/psych_jars.rb
CHANGED
data/psych.gemspec
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$LOAD_PATH.unshift './lib'
|
3
|
+
load 'psych/versions.rb'
|
2
4
|
|
3
5
|
Gem::Specification.new do |s|
|
4
6
|
s.name = "psych"
|
5
|
-
s.version =
|
6
|
-
s.authors = ["Aaron Patterson", "SHIBATA Hiroshi"]
|
7
|
-
s.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]
|
7
|
+
s.version = Psych::VERSION
|
8
|
+
s.authors = ["Aaron Patterson", "SHIBATA Hiroshi", "Charles Oliver Nutter"]
|
9
|
+
s.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org", "headius@headius.com"]
|
8
10
|
s.date = "2016-11-14"
|
9
11
|
s.summary = "Psych is a YAML parser and emitter"
|
10
12
|
s.description = <<-DESCRIPTION
|
@@ -17,7 +19,7 @@ DESCRIPTION
|
|
17
19
|
s.require_paths = ["lib"]
|
18
20
|
|
19
21
|
# for ruby core repository. It was generated by `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
-
s.files = [".gitignore", ".travis.yml", "CHANGELOG.rdoc", "Gemfile", "Mavenfile", "README.md", "Rakefile", "bin/console", "bin/setup", "ext/
|
22
|
+
s.files = [".gitignore", ".travis.yml", "CHANGELOG.rdoc", "Gemfile", "Mavenfile", "README.md", "Rakefile", "bin/console", "bin/setup", "ext/psych/.gitignore", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h", "ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h", "ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h", "ext/psych/yaml/LICENSE", "ext/psych/yaml/api.c", "ext/psych/yaml/config.h", "ext/psych/yaml/dumper.c", "ext/psych/yaml/emitter.c", "ext/psych/yaml/loader.c", "ext/psych/yaml/parser.c", "ext/psych/yaml/reader.c", "ext/psych/yaml/scanner.c", "ext/psych/yaml/writer.c", "ext/psych/yaml/yaml.h", "ext/psych/yaml/yaml_private.h", "lib/psych.rb", "lib/psych/class_loader.rb", "lib/psych/coder.rb", "lib/psych/core_ext.rb", "lib/psych/deprecated.rb", "lib/psych/exception.rb", "lib/psych/handler.rb", "lib/psych/handlers/document_stream.rb", "lib/psych/handlers/recorder.rb", "lib/psych/json/ruby_events.rb", "lib/psych/json/stream.rb", "lib/psych/json/tree_builder.rb", "lib/psych/json/yaml_events.rb", "lib/psych/nodes.rb", "lib/psych/nodes/alias.rb", "lib/psych/nodes/document.rb", "lib/psych/nodes/mapping.rb", "lib/psych/nodes/node.rb", "lib/psych/nodes/scalar.rb", "lib/psych/nodes/sequence.rb", "lib/psych/nodes/stream.rb", "lib/psych/omap.rb", "lib/psych/parser.rb", "lib/psych/scalar_scanner.rb", "lib/psych/set.rb", "lib/psych/stream.rb", "lib/psych/streaming.rb", "lib/psych/syntax_error.rb", "lib/psych/tree_builder.rb", "lib/psych/versions.rb", "lib/psych/visitors.rb","lib/psych/visitors/depth_first.rb", "lib/psych/visitors/emitter.rb", "lib/psych/visitors/json_tree.rb", "lib/psych/visitors/to_ruby.rb", "lib/psych/visitors/visitor.rb", "lib/psych/visitors/yaml_tree.rb", "lib/psych/y.rb", "psych.gemspec"]
|
21
23
|
|
22
24
|
s.rdoc_options = ["--main", "README.md"]
|
23
25
|
s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.md"]
|
@@ -29,9 +31,9 @@ DESCRIPTION
|
|
29
31
|
s.add_development_dependency 'rake-compiler', ">= 0.4.1"
|
30
32
|
s.add_development_dependency 'minitest', "~> 5.0"
|
31
33
|
|
32
|
-
if
|
33
|
-
require 'psych/versions'
|
34
|
+
if RUBY_ENGINE == 'jruby'
|
34
35
|
s.platform = 'java'
|
36
|
+
s.files.concat ["ext/java/PsychEmitter.java", "ext/java/PsychLibrary.java", "ext/java/PsychParser.java", "ext/java/PsychToRuby.java", "ext/java/PsychYamlTree.java", "lib/psych_jars.rb", "lib/psych.jar"]
|
35
37
|
s.requirements = "jar org.yaml:snakeyaml, #{Psych::DEFAULT_SNAKEYAML_VERSION}"
|
36
38
|
s.add_dependency 'jar-dependencies', '>= 0.1.7'
|
37
39
|
s.add_development_dependency 'ruby-maven'
|
metadata
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: psych
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
8
8
|
- SHIBATA Hiroshi
|
9
|
+
- Charles Oliver Nutter
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
@@ -74,6 +75,7 @@ description: |
|
|
74
75
|
email:
|
75
76
|
- aaron@tenderlovemaking.com
|
76
77
|
- hsbt@ruby-lang.org
|
78
|
+
- headius@headius.com
|
77
79
|
executables: []
|
78
80
|
extensions: []
|
79
81
|
extra_rdoc_files:
|
@@ -119,6 +121,7 @@ files:
|
|
119
121
|
- ext/psych/yaml/writer.c
|
120
122
|
- ext/psych/yaml/yaml.h
|
121
123
|
- ext/psych/yaml/yaml_private.h
|
124
|
+
- lib/psych.jar
|
122
125
|
- lib/psych.rb
|
123
126
|
- lib/psych/class_loader.rb
|
124
127
|
- lib/psych/coder.rb
|
@@ -180,9 +183,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
183
|
- !ruby/object:Gem::Version
|
181
184
|
version: '0'
|
182
185
|
requirements:
|
183
|
-
- jar org.yaml:snakeyaml, 1.
|
186
|
+
- jar org.yaml:snakeyaml, 1.17
|
184
187
|
rubyforge_project:
|
185
|
-
rubygems_version: 2.6.
|
188
|
+
rubygems_version: 2.6.8
|
186
189
|
signing_key:
|
187
190
|
specification_version: 4
|
188
191
|
summary: Psych is a YAML parser and emitter
|