ox 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ox might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/ext/ox/builder.c +19 -13
- data/ext/ox/ox.c +1 -1
- data/lib/ox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c02a5320be65c6d6ebdb2c68c1144b11ffb6550e
|
4
|
+
data.tar.gz: 9ed8d1775aac38b0d8e2e72ccdbcfc9d6afce7fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aae30b11d2a715171653477f48162a815dbf3b79a5e6d68ba85290018c296402b8d140cf5eda323c9540bbcd1c1a84e91ac0737a7a1d2a0f95dc09fe69f68af
|
7
|
+
data.tar.gz: 47020f8ff6795ad9ff214b85ea4668e89f45462bf6968d54ad40f418ee5bbff72a00388aa115e46ffd5e78ff99abade2dbc8ebb15035e1853dc996a5e6929744
|
data/README.md
CHANGED
@@ -34,6 +34,10 @@ A fast XML parser and Object marshaller as a Ruby gem.
|
|
34
34
|
|
35
35
|
## Release Notes
|
36
36
|
|
37
|
+
### Release 2.4.5
|
38
|
+
|
39
|
+
- Thanks to GUI for fixing an infinite loop in Ox::Builder.
|
40
|
+
|
37
41
|
### Release 2.4.4
|
38
42
|
|
39
43
|
- Builder element attributes with special characters are now encoded correctly.
|
@@ -42,12 +46,6 @@ A fast XML parser and Object marshaller as a Ruby gem.
|
|
42
46
|
value of -1 indicates no terminating newline character and an indentation of
|
43
47
|
zero.
|
44
48
|
|
45
|
-
### Release 2.4.3
|
46
|
-
|
47
|
-
- Fixed compiler warnings and errors.
|
48
|
-
|
49
|
-
- Updated for Ruby 2.4.0.
|
50
|
-
|
51
49
|
## Description
|
52
50
|
|
53
51
|
Optimized XML (Ox), as the name implies was written to provide speed optimized
|
data/ext/ox/builder.c
CHANGED
@@ -87,10 +87,12 @@ append_string(Builder b, const char *str, size_t size) {
|
|
87
87
|
|
88
88
|
buf_append_string(&b->buf, str, size);
|
89
89
|
b->col += size;
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
90
|
+
s = strchr(s, '\n');
|
91
|
+
while (NULL != s) {
|
92
|
+
b->line++;
|
93
|
+
b->col = end - s;
|
94
|
+
s = strchr(s + 1, '\n');
|
95
|
+
}
|
94
96
|
b->pos += size;
|
95
97
|
} else {
|
96
98
|
char buf[256];
|
@@ -313,7 +315,7 @@ to_s(Builder b) {
|
|
313
315
|
* which is the builder instance. The return value is then the generated string.
|
314
316
|
*
|
315
317
|
* - +options+ - (Hash) formating options
|
316
|
-
* - +:indent+ (Fixnum) indentaion level, negative
|
318
|
+
* - +:indent+ (Fixnum) indentaion level, negative values excludes terminating newline
|
317
319
|
* - +:size+ (Fixnum) the initial size of the string buffer
|
318
320
|
*/
|
319
321
|
static VALUE
|
@@ -368,7 +370,7 @@ builder_new(int argc, VALUE *argv, VALUE self) {
|
|
368
370
|
*
|
369
371
|
* - +filename+ (String) filename to write to
|
370
372
|
* - +options+ - (Hash) formating options
|
371
|
-
* - +:indent+ (Fixnum) indentaion level
|
373
|
+
* - +:indent+ (Fixnum) indentaion level, negative values excludes terminating newline
|
372
374
|
* - +:size+ (Fixnum) the initial size of the string buffer
|
373
375
|
*/
|
374
376
|
static VALUE
|
@@ -430,7 +432,7 @@ builder_file(int argc, VALUE *argv, VALUE self) {
|
|
430
432
|
*
|
431
433
|
* - +io+ (String) IO to write to
|
432
434
|
* - +options+ - (Hash) formating options
|
433
|
-
* - +:indent+ (Fixnum) indentaion level
|
435
|
+
* - +:indent+ (Fixnum) indentaion level, negative values excludes terminating newline
|
434
436
|
* - +:size+ (Fixnum) the initial size of the string buffer
|
435
437
|
*/
|
436
438
|
static VALUE
|
@@ -714,9 +716,11 @@ builder_cdata(VALUE self, VALUE data) {
|
|
714
716
|
b->pos += 9;
|
715
717
|
buf_append_string(&b->buf, str, len);
|
716
718
|
b->col += len;
|
717
|
-
|
718
|
-
|
719
|
-
|
719
|
+
s = strchr(s, '\n');
|
720
|
+
while (NULL != s) {
|
721
|
+
b->line++;
|
722
|
+
b->col = end - s;
|
723
|
+
s = strchr(s + 1, '\n');
|
720
724
|
}
|
721
725
|
b->pos += len;
|
722
726
|
buf_append_string(&b->buf, "]]>", 3);
|
@@ -751,9 +755,11 @@ builder_raw(VALUE self, VALUE text) {
|
|
751
755
|
i_am_a_child(b, true);
|
752
756
|
buf_append_string(&b->buf, str, len);
|
753
757
|
b->col += len;
|
754
|
-
|
755
|
-
|
756
|
-
|
758
|
+
s = strchr(s, '\n');
|
759
|
+
while (NULL != s) {
|
760
|
+
b->line++;
|
761
|
+
b->col = end - s;
|
762
|
+
s = strchr(s + 1, '\n');
|
757
763
|
}
|
758
764
|
b->pos += len;
|
759
765
|
|
data/ext/ox/ox.c
CHANGED
@@ -695,7 +695,7 @@ load(char *xml, int argc, VALUE *argv, VALUE self, VALUE encoding, Err err) {
|
|
695
695
|
} else if (skip_white_sym == v) {
|
696
696
|
options.skip = SpcSkip;
|
697
697
|
} else {
|
698
|
-
rb_raise(ox_parse_error_class, ":
|
698
|
+
rb_raise(ox_parse_error_class, ":skip must be :skip_none, :skip_return, or :skip_white.\n");
|
699
699
|
}
|
700
700
|
}
|
701
701
|
|
data/lib/ox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: "A fast XML parser and object serializer that uses only standard C lib.\n
|
14
14
|
\ \nOptimized XML (Ox), as the name implies was written to provide speed
|