json 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 320c2302d7fb456edd4ef4a745cc5ed7ad4e1846
4
- data.tar.gz: 71abe50769b7736fbcec5051546c3a1df959c18e
3
+ metadata.gz: 7f771ff2dbe2582a3e23652725e44a2c04f9ef38
4
+ data.tar.gz: 1ee70a27e6878091c34a96f65be2dc4e9cb7b509
5
5
  SHA512:
6
- metadata.gz: 58774480805deb214c3f28fbd11c306d98de072de879726457077e23884ca49573f64f83ee41882518b958dbc621732c6f463324ad891e0875f2a8847c52e188
7
- data.tar.gz: de4ab46ed538410857c7f4118147d6ee92348eb4dc6dbb85447c1142692a5dfefc6f01333565f909869ab249ea5043cf8c0debb851d7ff870602ab1900589d59
6
+ metadata.gz: e38803d57bcb19d115083216ff027bbf749879c8fc09b676937072f5e1f95d975965c263252a8aeba6581405e09fd423a5bbc7d5ecaa4d6033d9a12bc9da262d
7
+ data.tar.gz: 80a69daa2ffa65cf6b9824dc77ce5e286a5e021c111d70ec0eb3fdf213a38b83feb48f004b7a2165586405a2f898b1358d5c74b9f6ffee33b627111f9af86208
data/.gitignore CHANGED
@@ -14,3 +14,4 @@ Gemfile.lock
14
14
  .DS_Store
15
15
  */**/Makefile
16
16
  */**/*.o
17
+ .byebug_history
@@ -4,17 +4,16 @@ language: ruby
4
4
 
5
5
  # Specify which ruby versions you wish to run your tests on, each version will be used
6
6
  rvm:
7
+ - 1.9.3
7
8
  - 2.0.0
8
9
  - 2.1
9
10
  - 2.2
10
- - 2.3.1
11
+ - 2.3.3
12
+ - 2.4.0
13
+ - jruby
11
14
  - ruby-head
12
15
  matrix:
13
- include:
14
- - rvm: jruby
15
- env: JRUBY_OPTS="--2.0"
16
16
  allow_failures:
17
- - rvm: rbx-2
18
17
  - rvm: ruby-head
19
18
  script: "bundle exec rake"
20
19
  sudo: false
data/CHANGES.md CHANGED
@@ -1,11 +1,16 @@
1
1
  # Changes
2
2
 
3
+
4
+ ## 2017-01-12 (2.0.3)
5
+ * Set `required_ruby_version` to 1.9
6
+ * Some small fixes
7
+
3
8
  ## 2016-07-26 (2.0.2)
4
9
  * Specify `required_ruby_version` for json\_pure.
5
10
  * Fix issue #295 failure when parsing frozen strings.
6
11
 
7
12
  ## 2016-07-01 (2.0.1)
8
- * Fix problem when requiring json\_pure and Parser constant was defiend top
13
+ * Fix problem when requiring json\_pure and Parser constant was defined top
9
14
  level.
10
15
  * Add `RB_GC_GUARD` to avoid possible GC problem via Pete Johns.
11
16
  * Store `current_nesting` on stack by Aaron Patterson.
data/Gemfile CHANGED
@@ -2,8 +2,15 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gemspec :name => 'json'
6
- gemspec :name => 'json_pure'
7
- gemspec :name => 'json-java'
5
+ case ENV['JSON']
6
+ when 'ext', nil
7
+ if ENV['RUBY_ENGINE'] == 'jruby'
8
+ gemspec :name => 'json', :path => 'java'
9
+ else
10
+ gemspec :name => 'json'
11
+ end
12
+ when 'pure'
13
+ gemspec :name => 'json_pure'
14
+ end
8
15
 
9
16
  gem 'simplecov'
data/README.md CHANGED
@@ -115,7 +115,7 @@ generate a JSON document from an array or hash:
115
115
 
116
116
  ```ruby
117
117
  document = JSON 'test' => 23 # => "{\"test\":23}"
118
- document = JSON['test'] => 23 # => "{\"test\":23}"
118
+ document = JSON['test' => 23] # => "{\"test\":23}"
119
119
  ```
120
120
 
121
121
  and
data/Rakefile CHANGED
@@ -95,7 +95,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
95
95
  s.email = "flori@ping.de"
96
96
  s.homepage = "http://flori.github.com/#{PKG_NAME}"
97
97
  s.license = 'Ruby'
98
- s.required_ruby_version = '~> 2.0'
98
+ s.required_ruby_version = '>= 1.9'
99
99
  end
100
100
 
101
101
  desc 'Creates a json_pure.gemspec file'
@@ -133,7 +133,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
133
133
  s.email = "flori@ping.de"
134
134
  s.homepage = "http://flori.github.com/#{PKG_NAME}"
135
135
  s.license = 'Ruby'
136
- s.required_ruby_version = '~> 2.0'
136
+ s.required_ruby_version = '>= 1.9'
137
137
  end
138
138
 
139
139
  desc 'Creates a json.gemspec file'
@@ -200,13 +200,11 @@ namespace :gems do
200
200
  end
201
201
 
202
202
  if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
203
- if ENV.key?('JAVA_HOME')
204
- warn " *** JAVA_HOME was set to #{ENV['JAVA_HOME'].inspect}"
205
- elsif File.directory?(local_java = '/usr/local/java/jdk') ||
206
- File.directory?(local_java = '/usr/lib/jvm/java-6-openjdk')
207
- then
208
- ENV['JAVA_HOME'] = local_java
209
- end
203
+ ENV['JAVA_HOME'] ||= [
204
+ '/usr/local/java/jdk',
205
+ '/usr/lib/jvm/java-6-openjdk',
206
+ '/Library/Java/Home',
207
+ ].find { |c| File.directory?(c) }
210
208
  if ENV['JAVA_HOME']
211
209
  warn " *** JAVA_HOME is set to #{ENV['JAVA_HOME'].inspect}"
212
210
  ENV['PATH'] = ENV['PATH'].split(/:/).unshift(java_path = "#{ENV['JAVA_HOME']}/bin") * ':'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.2
1
+ 2.0.3
@@ -1675,7 +1675,7 @@ static VALUE convert_encoding(VALUE source)
1675
1675
  }
1676
1676
  FORCE_UTF8(source);
1677
1677
  } else {
1678
- source = rb_str_conv_enc(source, NULL, rb_utf8_encoding());
1678
+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
1679
1679
  }
1680
1680
  #endif
1681
1681
  return source;
@@ -570,7 +570,7 @@ static VALUE convert_encoding(VALUE source)
570
570
  }
571
571
  FORCE_UTF8(source);
572
572
  } else {
573
- source = rb_str_conv_enc(source, NULL, rb_utf8_encoding());
573
+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
574
574
  }
575
575
  #endif
576
576
  return source;
Binary file
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: json_pure 2.0.2 ruby lib
2
+ # stub: json_pure 2.0.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "json_pure".freeze
6
- s.version = "2.0.2"
6
+ s.version = "2.0.3"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2016-07-26"
11
+ s.date = "2017-01-12"
12
12
  s.description = "This is a JSON implementation in pure Ruby.".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.extra_rdoc_files = ["README.md".freeze]
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
16
16
  s.homepage = "http://flori.github.com/json".freeze
17
17
  s.licenses = ["Ruby".freeze]
18
18
  s.rdoc_options = ["--title".freeze, "JSON implemention for ruby".freeze, "--main".freeze, "README.md".freeze]
19
- s.required_ruby_version = Gem::Requirement.new("~> 2.0".freeze)
20
- s.rubygems_version = "2.6.4".freeze
19
+ s.required_ruby_version = Gem::Requirement.new(">= 1.9".freeze)
20
+ s.rubygems_version = "2.6.8".freeze
21
21
  s.summary = "JSON Implementation for Ruby".freeze
22
22
  s.test_files = ["./tests/test_helper.rb".freeze]
23
23
 
@@ -7,7 +7,7 @@ require 'ostruct'
7
7
  class OpenStruct
8
8
 
9
9
  # Deserializes JSON string by constructing new Struct object with values
10
- # <tt>v</tt> serialized by <tt>to_json</tt>.
10
+ # <tt>t</tt> serialized by <tt>to_json</tt>.
11
11
  def self.json_create(object)
12
12
  new(object['t'] || object[:t])
13
13
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
  module JSON
3
3
  # JSON version
4
- VERSION = '2.0.2'
4
+ VERSION = '2.0.3'
5
5
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
6
6
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
7
7
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -277,12 +277,13 @@ EOT
277
277
  if defined?(JSON::Ext::Generator)
278
278
  def test_broken_bignum # [ruby-core:38867]
279
279
  pid = fork do
280
- Bignum.class_eval do
280
+ x = 1 << 64
281
+ x.class.class_eval do
281
282
  def to_s
282
283
  end
283
284
  end
284
285
  begin
285
- JSON::Ext::Generator::State.new.generate(1<<64)
286
+ JSON::Ext::Generator::State.new.generate(x)
286
287
  exit 1
287
288
  rescue TypeError
288
289
  exit 0
@@ -1,5 +1,3 @@
1
- gem 'json', File.read('VERSION').chomp
2
-
3
1
  case ENV['JSON']
4
2
  when 'pure'
5
3
  $:.unshift 'lib'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-26 00:00:00.000000000 Z
11
+ date: 2017-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -170,9 +170,9 @@ require_paths:
170
170
  - lib
171
171
  required_ruby_version: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - "~>"
173
+ - - ">="
174
174
  - !ruby/object:Gem::Version
175
- version: '2.0'
175
+ version: '1.9'
176
176
  required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ">="
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.6.4
183
+ rubygems_version: 2.6.8
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: JSON Implementation for Ruby