json_pure 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a00f1b6bc6dcfe1bb1f61cd43c013fa2ea8e8e35
4
- data.tar.gz: 71abe50769b7736fbcec5051546c3a1df959c18e
3
+ metadata.gz: 599eefe7c422d40c2ff44c43c1b23ea43b975d7c
4
+ data.tar.gz: 62794b8c0ecc154922fbfaa29216a7fb881307b2
5
5
  SHA512:
6
- metadata.gz: bd4501f58b7f348d7a9c3ec930dfc70739a329b66b6649ee3f688d2ea09a4ee6b27dab0807117ef586be80a483418acd1e93ad3b42d3954770405259832fe7d0
7
- data.tar.gz: de4ab46ed538410857c7f4118147d6ee92348eb4dc6dbb85447c1142692a5dfefc6f01333565f909869ab249ea5043cf8c0debb851d7ff870602ab1900589d59
6
+ metadata.gz: 7863446d00a6da77b9d8a60394c464010cef20bd47994ff386d3794dbd70b110c22273395241b0ded1ecd3ec05fdc4307572f20746f09869afe7260856dd0dcd
7
+ data.tar.gz: 4a34ea97107f72aa3ade90e03e9effa78cda56b434b89151b67941f56426ffd76b5e35c987655d8f4473d14edc56686650847d897f3ce681a73472012e78b730
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_pure
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
@@ -167,9 +167,9 @@ require_paths:
167
167
  - lib
168
168
  required_ruby_version: !ruby/object:Gem::Requirement
169
169
  requirements:
170
- - - "~>"
170
+ - - ">="
171
171
  - !ruby/object:Gem::Version
172
- version: '2.0'
172
+ version: '1.9'
173
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  requirements:
175
175
  - - ">="
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  requirements: []
179
179
  rubyforge_project:
180
- rubygems_version: 2.6.4
180
+ rubygems_version: 2.6.8
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: JSON Implementation for Ruby