edn_turbo 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/edn_turbo/edn_parser_util.cc +1 -1
- data/ext/edn_turbo/edn_parser_util_unicode.cc +1 -0
- data/lib/edn_turbo/version.rb +2 -2
- data/test/test_output_diff.rb +16 -4
- 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: 22aa24b410b3f96a61348d2337a09a149c8b9cb2
|
4
|
+
data.tar.gz: a2acc757c6860c20554eb8193cff4c85f75d7c22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6414fa962e6d8b5558d615c5fa54a121edc6ee17f2e6080d81b183806224e6937096c1d43e6f3be58e30b2a383010f43e3c76200cfa774887e406317ba57f0b6
|
7
|
+
data.tar.gz: 8be7e90de1ad7383a11e5b1613b59be193bdb0e06e9483584bd1459b9b274a45aee486f301b367995eb12da336f41671618eb5aa729a052ef25d8a365c64f6d9
|
@@ -157,7 +157,7 @@ namespace edn
|
|
157
157
|
start = io_buffer;
|
158
158
|
} else if (io_buffer_len < new_length) {
|
159
159
|
// resize the buffer
|
160
|
-
realloc(reinterpret_cast<void*>(io_buffer), new_length);
|
160
|
+
io_buffer = reinterpret_cast<char*>(realloc(reinterpret_cast<void*>(io_buffer), new_length));
|
161
161
|
}
|
162
162
|
|
163
163
|
if (!start) {
|
data/lib/edn_turbo/version.rb
CHANGED
data/test/test_output_diff.rb
CHANGED
@@ -18,19 +18,31 @@ class EDNT_Test < Minitest::Test
|
|
18
18
|
|
19
19
|
# test using parse() first
|
20
20
|
output = @parser.parse(input)
|
21
|
-
|
21
|
+
if expected_output == nil
|
22
|
+
assert_nil(output)
|
23
|
+
else
|
24
|
+
assert_equal(expected_output, output)
|
25
|
+
end
|
22
26
|
|
23
27
|
# now test setting the source and using read (although one-shot)
|
24
28
|
@parser.set_input(input)
|
25
29
|
output = @parser.read
|
26
|
-
|
30
|
+
if expected_output == nil
|
31
|
+
assert_nil(output)
|
32
|
+
else
|
33
|
+
assert_equal(expected_output, output)
|
34
|
+
end
|
27
35
|
}
|
28
36
|
|
29
37
|
# and test passing the IO
|
30
38
|
File.open(file) { |file_io|
|
31
39
|
@parser.set_input(file_io)
|
32
|
-
|
33
|
-
|
40
|
+
output = @parser.read
|
41
|
+
if expected_output == nil
|
42
|
+
assert_nil(output)
|
43
|
+
else
|
44
|
+
assert_equal(expected_output, output)
|
45
|
+
end
|
34
46
|
}
|
35
47
|
output
|
36
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edn_turbo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Porras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: edn
|