json 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of json might be problematic. Click here for more details.

@@ -1,6 +1,14 @@
1
1
  $KCODE='UTF8'
2
2
  require 'json'
3
3
 
4
+ require 'iconv'
5
+ ISO_8859_1_TO_UTF8 = Iconv.new('utf-8', 'iso-8859-15')
6
+ class ::String
7
+ def to_utf8
8
+ ISO_8859_1_TO_UTF8.iconv self
9
+ end
10
+ end
11
+
4
12
  class Fuzzer
5
13
  def initialize(n, freqs = {})
6
14
  sum = freqs.inject(0.0) { |s, x| s + x.last }
@@ -12,13 +20,13 @@ class Fuzzer
12
20
  end
13
21
  @freqs = freqs
14
22
  @n = n
15
- @alpha = (0..0x7f).to_a
23
+ @alpha = (0..0xff).to_a
16
24
  end
17
25
 
18
26
  def random_string
19
27
  s = ''
20
28
  30.times { s << @alpha[rand(@alpha.size)] }
21
- s
29
+ s.to_utf8
22
30
  end
23
31
 
24
32
  def pick
File without changes
metadata CHANGED
@@ -1,35 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: json
5
3
  version: !ruby/object:Gem::Version
6
- version: 1.1.2
7
- date: 2007-11-27 00:00:00 +01:00
8
- summary: A JSON implementation as a Ruby extension
9
- require_paths:
10
- - ext/json/ext
11
- - ext
12
- - lib
13
- email: flori@ping.de
14
- homepage: http://json.rubyforge.org
15
- rubyforge_project: json
16
- description: ""
17
- autorequire:
18
- default_executable: edit_json.rb
19
- bindir: bin
20
- has_rdoc: true
21
- required_ruby_version: !ruby/object:Gem::Version::Requirement
22
- requirements:
23
- - - ">"
24
- - !ruby/object:Gem::Version
25
- version: 0.0.0
26
- version:
4
+ version: 1.1.3
27
5
  platform: ruby
28
- signing_key:
29
- cert_chain:
30
- post_install_message:
31
6
  authors:
32
7
  - Florian Frank
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-07-11 00:00:00 +02:00
13
+ default_executable: edit_json.rb
14
+ dependencies: []
15
+
16
+ description: ""
17
+ email: flori@ping.de
18
+ executables:
19
+ - edit_json.rb
20
+ extensions:
21
+ - ext/json/ext/parser/extconf.rb
22
+ - ext/json/ext/generator/extconf.rb
23
+ extra_rdoc_files: []
24
+
33
25
  files:
34
26
  - install.rb
35
27
  - lib
@@ -132,22 +124,37 @@ files:
132
124
  - tools
133
125
  - tools/fuzz.rb
134
126
  - tools/server.rb
135
- test_files:
136
- - tests/runner.rb
127
+ has_rdoc: true
128
+ homepage: http://json.rubyforge.org
129
+ post_install_message:
137
130
  rdoc_options:
138
131
  - --title
139
132
  - JSON -- A JSON implemention
140
133
  - --main
141
134
  - JSON
142
135
  - --line-numbers
143
- extra_rdoc_files: []
144
-
145
- executables:
146
- - edit_json.rb
147
- extensions:
148
- - ext/json/ext/parser/extconf.rb
149
- - ext/json/ext/generator/extconf.rb
136
+ require_paths:
137
+ - ext/json/ext
138
+ - ext
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: "0"
145
+ version:
146
+ required_rubygems_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: "0"
151
+ version:
150
152
  requirements: []
151
153
 
152
- dependencies: []
153
-
154
+ rubyforge_project: json
155
+ rubygems_version: 1.1.1
156
+ signing_key:
157
+ specification_version: 2
158
+ summary: A JSON implementation as a Ruby extension
159
+ test_files:
160
+ - tests/runner.rb