json_pure 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +8 -0
- data/Rakefile +4 -2
- data/VERSION +1 -1
- data/ext/json/ext/generator/generator.c +1 -1
- data/lib/json/pure/parser.rb +3 -1
- data/lib/json/version.rb +1 -1
- metadata +109 -127
data/CHANGES
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
2009-06-29 (1.1.7)
|
2
|
+
* Security Fix for JSON::Pure::Parser. A specially designed string could
|
3
|
+
cause catastrophic backtracking in one of the parser's regular expressions
|
4
|
+
in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
|
5
|
+
Thanks to Bartosz Blimke <bartosz@new-bamboo.co.uk> for reporting this
|
6
|
+
problem.
|
7
|
+
* This release also uses a less strict ruby version requirement for the
|
8
|
+
creation of the mswin32 native gem.
|
1
9
|
2009-05-10 (1.1.6)
|
2
10
|
* No changes. І tested native linux gems in the last release and they don't
|
3
11
|
play well with different ruby versions other than the one the gem was built
|
data/Rakefile
CHANGED
@@ -134,11 +134,13 @@ task :test => [ :test_pure, :test_ext ]
|
|
134
134
|
|
135
135
|
desc "Benchmarking parser"
|
136
136
|
task :benchmark_parser do
|
137
|
+
ENV['RUBYOPT'] = "-Ilib:ext #{ENV['RUBYOPT']}"
|
137
138
|
ruby 'benchmarks/parser_benchmark.rb'
|
138
139
|
end
|
139
140
|
|
140
141
|
desc "Benchmarking generator"
|
141
142
|
task :benchmark_generator do
|
143
|
+
ENV['RUBYOPT'] = "-Ilib:ext #{ENV['RUBYOPT']}"
|
142
144
|
ruby 'benchmarks/generator_benchmark.rb'
|
143
145
|
end
|
144
146
|
|
@@ -160,7 +162,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
|
|
160
162
|
s.name = 'json_pure'
|
161
163
|
s.version = PKG_VERSION
|
162
164
|
s.summary = "A JSON implementation in Ruby"
|
163
|
-
s.description = ""
|
165
|
+
s.description = "This is a JSON implementation in pure Ruby."
|
164
166
|
|
165
167
|
s.files = PKG_FILES
|
166
168
|
|
@@ -191,7 +193,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
|
|
191
193
|
s.name = 'json'
|
192
194
|
s.version = PKG_VERSION
|
193
195
|
s.summary = "A JSON implementation as a Ruby extension"
|
194
|
-
s.description = ""
|
196
|
+
s.description = "This is a JSON implementation as a Ruby extension in C."
|
195
197
|
|
196
198
|
s.files = PKG_FILES
|
197
199
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.7
|
@@ -496,7 +496,7 @@ static VALUE cState_s_allocate(VALUE klass)
|
|
496
496
|
* Configure this State instance with the Hash _opts_, and return
|
497
497
|
* itself.
|
498
498
|
*/
|
499
|
-
static
|
499
|
+
static VALUE cState_configure(VALUE self, VALUE opts)
|
500
500
|
{
|
501
501
|
VALUE tmp;
|
502
502
|
GET_STATE(self);
|
data/lib/json/pure/parser.rb
CHANGED
@@ -6,9 +6,11 @@ module JSON
|
|
6
6
|
# into a Ruby data structure.
|
7
7
|
class Parser < StringScanner
|
8
8
|
STRING = /" ((?:[^\x0-\x1f"\\] |
|
9
|
+
# escaped special characters:
|
9
10
|
\\["\\\/bfnrt] |
|
10
11
|
\\u[0-9a-fA-F]{4} |
|
11
|
-
|
12
|
+
# match all but escaped special characters:
|
13
|
+
\\[\x20-\x21\x23-\x2e\x30-\x5b\x5d-\x61\x63-\x65\x67-\x6d\x6f-\x71\x73\x75-\xff])*)
|
12
14
|
"/nx
|
13
15
|
INTEGER = /(-?0|-?[1-9]\d*)/
|
14
16
|
FLOAT = /(-?
|
data/lib/json/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_pure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-30 00:00:00 +02:00
|
13
13
|
default_executable: edit_json.rb
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description:
|
16
|
+
description: This is a JSON implementation in pure Ruby.
|
17
17
|
email: flori@ping.de
|
18
18
|
executables:
|
19
19
|
- edit_json.rb
|
@@ -23,142 +23,124 @@ extensions: []
|
|
23
23
|
extra_rdoc_files: []
|
24
24
|
|
25
25
|
files:
|
26
|
+
- RUBY
|
27
|
+
- CHANGES
|
28
|
+
- bin/edit_json.rb
|
29
|
+
- bin/prettify_json.rb
|
30
|
+
- VERSION
|
26
31
|
- GPL
|
27
|
-
-
|
28
|
-
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
62
|
-
- tests/fixtures/fail25.json
|
63
|
-
- tests/test_json_generate.rb
|
64
|
-
- tests/test_json_rails.rb
|
65
|
-
- tests/test_json_fixtures.rb
|
66
|
-
- install.rb
|
67
|
-
- ext
|
68
|
-
- ext/json
|
69
|
-
- ext/json/ext
|
70
|
-
- ext/json/ext/generator
|
71
|
-
- ext/json/ext/generator/unicode.h
|
32
|
+
- TODO
|
33
|
+
- README
|
34
|
+
- benchmarks/parser_benchmark.rb
|
35
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
|
36
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
|
37
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
|
38
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
|
39
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
|
40
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
|
41
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
|
42
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
|
43
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
|
44
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
|
45
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
|
46
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
|
47
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
|
48
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
|
49
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
|
50
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
|
51
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
|
52
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
|
53
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
|
54
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
|
55
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
|
56
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
|
57
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
|
58
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
|
59
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
|
60
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
|
61
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
|
62
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
|
63
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat
|
64
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat
|
65
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
|
66
|
+
- benchmarks/generator_benchmark.rb
|
72
67
|
- ext/json/ext/generator/extconf.rb
|
73
|
-
- ext/json/ext/generator/generator.c
|
74
68
|
- ext/json/ext/generator/unicode.c
|
75
|
-
- ext/json/ext/
|
76
|
-
- ext/json/ext/
|
77
|
-
- ext/json/ext/parser/parser.rl
|
69
|
+
- ext/json/ext/generator/generator.c
|
70
|
+
- ext/json/ext/generator/unicode.h
|
78
71
|
- ext/json/ext/parser/extconf.rb
|
79
|
-
- ext/json/ext/parser/parser.
|
72
|
+
- ext/json/ext/parser/parser.rl
|
80
73
|
- ext/json/ext/parser/unicode.c
|
81
|
-
-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
- tools/server.rb
|
74
|
+
- ext/json/ext/parser/parser.c
|
75
|
+
- ext/json/ext/parser/unicode.h
|
76
|
+
- Rakefile
|
85
77
|
- tools/fuzz.rb
|
86
|
-
-
|
78
|
+
- tools/server.rb
|
79
|
+
- doc-templates/main.txt
|
87
80
|
- lib/json.rb
|
88
|
-
- lib/json
|
89
|
-
- lib/json/add
|
90
|
-
- lib/json/add/core.rb
|
91
|
-
- lib/json/add/rails.rb
|
92
|
-
- lib/json/ext.rb
|
81
|
+
- lib/json/json.xpm
|
93
82
|
- lib/json/Key.xpm
|
94
|
-
- lib/json/Array.xpm
|
95
|
-
- lib/json/common.rb
|
96
|
-
- lib/json/ext
|
97
|
-
- lib/json/Hash.xpm
|
98
83
|
- lib/json/String.xpm
|
99
|
-
- lib/json/FalseClass.xpm
|
100
84
|
- lib/json/Numeric.xpm
|
101
|
-
- lib/json/
|
102
|
-
- lib/json/
|
85
|
+
- lib/json/Hash.xpm
|
86
|
+
- lib/json/add/rails.rb
|
87
|
+
- lib/json/add/core.rb
|
88
|
+
- lib/json/common.rb
|
89
|
+
- lib/json/Array.xpm
|
90
|
+
- lib/json/FalseClass.xpm
|
103
91
|
- lib/json/pure/generator.rb
|
104
92
|
- lib/json/pure/parser.rb
|
93
|
+
- lib/json/TrueClass.xpm
|
105
94
|
- lib/json/pure.rb
|
106
|
-
- lib/json/
|
107
|
-
- lib/json/
|
95
|
+
- lib/json/version.rb
|
96
|
+
- lib/json/ext.rb
|
108
97
|
- lib/json/editor.rb
|
109
|
-
- lib/json/
|
110
|
-
- TODO
|
111
|
-
- data
|
112
|
-
- data/prototype.js
|
113
|
-
- data/index.html
|
98
|
+
- lib/json/NilClass.xpm
|
114
99
|
- data/example.json
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
124
|
-
-
|
125
|
-
-
|
126
|
-
-
|
127
|
-
-
|
128
|
-
-
|
129
|
-
-
|
130
|
-
-
|
131
|
-
-
|
132
|
-
-
|
133
|
-
-
|
134
|
-
-
|
135
|
-
-
|
136
|
-
-
|
137
|
-
-
|
138
|
-
-
|
139
|
-
-
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
144
|
-
-
|
145
|
-
-
|
146
|
-
-
|
147
|
-
-
|
148
|
-
-
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
152
|
-
-
|
153
|
-
-
|
154
|
-
-
|
155
|
-
- benchmarks/data
|
156
|
-
- benchmarks/parser_benchmark.rb
|
157
|
-
- benchmarks/generator_benchmark.rb
|
158
|
-
- Rakefile
|
159
|
-
- CHANGES
|
100
|
+
- data/index.html
|
101
|
+
- data/prototype.js
|
102
|
+
- tests/test_json_addition.rb
|
103
|
+
- tests/fixtures/pass16.json
|
104
|
+
- tests/fixtures/fail4.json
|
105
|
+
- tests/fixtures/fail1.json
|
106
|
+
- tests/fixtures/fail28.json
|
107
|
+
- tests/fixtures/fail8.json
|
108
|
+
- tests/fixtures/fail19.json
|
109
|
+
- tests/fixtures/pass2.json
|
110
|
+
- tests/fixtures/pass26.json
|
111
|
+
- tests/fixtures/pass1.json
|
112
|
+
- tests/fixtures/fail3.json
|
113
|
+
- tests/fixtures/fail20.json
|
114
|
+
- tests/fixtures/pass3.json
|
115
|
+
- tests/fixtures/pass15.json
|
116
|
+
- tests/fixtures/fail12.json
|
117
|
+
- tests/fixtures/fail13.json
|
118
|
+
- tests/fixtures/fail22.json
|
119
|
+
- tests/fixtures/fail24.json
|
120
|
+
- tests/fixtures/fail9.json
|
121
|
+
- tests/fixtures/fail2.json
|
122
|
+
- tests/fixtures/fail14.json
|
123
|
+
- tests/fixtures/fail6.json
|
124
|
+
- tests/fixtures/fail21.json
|
125
|
+
- tests/fixtures/fail7.json
|
126
|
+
- tests/fixtures/pass17.json
|
127
|
+
- tests/fixtures/fail11.json
|
128
|
+
- tests/fixtures/fail25.json
|
129
|
+
- tests/fixtures/fail5.json
|
130
|
+
- tests/fixtures/fail18.json
|
131
|
+
- tests/fixtures/fail27.json
|
132
|
+
- tests/fixtures/fail10.json
|
133
|
+
- tests/fixtures/fail23.json
|
134
|
+
- tests/test_json_rails.rb
|
135
|
+
- tests/test_json.rb
|
136
|
+
- tests/test_json_generate.rb
|
137
|
+
- tests/test_json_unicode.rb
|
138
|
+
- tests/test_json_fixtures.rb
|
139
|
+
- install.rb
|
160
140
|
has_rdoc: true
|
161
141
|
homepage: http://json.rubyforge.org
|
142
|
+
licenses: []
|
143
|
+
|
162
144
|
post_install_message:
|
163
145
|
rdoc_options:
|
164
146
|
- --title
|
@@ -183,14 +165,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
165
|
requirements: []
|
184
166
|
|
185
167
|
rubyforge_project: json
|
186
|
-
rubygems_version: 1.3.
|
168
|
+
rubygems_version: 1.3.2
|
187
169
|
signing_key:
|
188
|
-
specification_version:
|
170
|
+
specification_version: 3
|
189
171
|
summary: A JSON implementation in Ruby
|
190
172
|
test_files:
|
191
|
-
- tests/test_json_unicode.rb
|
192
|
-
- tests/test_json.rb
|
193
173
|
- tests/test_json_addition.rb
|
194
|
-
- tests/test_json_generate.rb
|
195
174
|
- tests/test_json_rails.rb
|
175
|
+
- tests/test_json.rb
|
176
|
+
- tests/test_json_generate.rb
|
177
|
+
- tests/test_json_unicode.rb
|
196
178
|
- tests/test_json_fixtures.rb
|