json 1.7.4 → 1.7.5

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.

@@ -3,6 +3,7 @@ bundler_args: --binstubs
3
3
 
4
4
  # Specify which ruby versions you wish to run your tests on, each version will be used
5
5
  rvm:
6
+ - 1.8.6
6
7
  - 1.8.7
7
8
  - 1.9.2
8
9
  - 1.9.3
data/CHANGES CHANGED
@@ -1,3 +1,5 @@
1
+ 2012-08-17 (1.7.5)
2
+ * Fix compilation of extension on older rubies.
1
3
  2012-07-26 (1.7.4)
2
4
  * Fix compilation problem on AIX, see https://github.com/flori/json/issues/142
3
5
  2012-05-12 (1.7.3)
data/Gemfile CHANGED
@@ -8,8 +8,9 @@ gemspec :name => 'json-java'
8
8
 
9
9
  group :development, :test do
10
10
  gem 'simplecov', :platform => :mri_19
11
+ gem 'utils'
11
12
  end
12
13
 
13
14
  group :test do
14
- gem 'test-unit', '2.4.7', :platform => :mri_19
15
+ gem 'test-unit', '~> 2.5', :platform => :mri_19
15
16
  end
data/Rakefile CHANGED
@@ -23,6 +23,10 @@ class UndocumentedTestTask < Rake::TestTask
23
23
  def desc(*) end
24
24
  end
25
25
 
26
+ def skip_sdoc(src)
27
+ src.gsub(/^.*sdoc.*/) { |s| s + ' if RUBY_VERSION > "1.8.6"' }
28
+ end
29
+
26
30
  MAKE = ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') }
27
31
  BUNDLE = ENV['BUNDLE'] || %w[bundle].find { |c| system(c, '-v') }
28
32
  PKG_NAME = 'json'
@@ -84,7 +88,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
84
88
 
85
89
  s.require_path = 'lib'
86
90
  s.add_development_dependency 'permutation'
87
- s.add_development_dependency 'sdoc'
91
+ s.add_development_dependency 'sdoc', '~> 0.3.16'
88
92
  s.add_development_dependency 'rake', '~>0.9.2'
89
93
 
90
94
  s.extra_rdoc_files << 'README.rdoc'
@@ -101,7 +105,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
101
105
  desc 'Creates a json_pure.gemspec file'
102
106
  task :gemspec_pure => :version do
103
107
  File.open('json_pure.gemspec', 'w') do |gemspec|
104
- gemspec.write spec_pure.to_ruby
108
+ gemspec.write skip_sdoc(spec_pure.to_ruby)
105
109
  end
106
110
  end
107
111
 
@@ -122,7 +126,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
122
126
 
123
127
  s.require_path = 'lib'
124
128
  s.add_development_dependency 'permutation'
125
- s.add_development_dependency 'sdoc'
129
+ s.add_development_dependency 'sdoc', '~> 0.3.16'
126
130
 
127
131
  s.extra_rdoc_files << 'README.rdoc'
128
132
  s.rdoc_options <<
@@ -138,7 +142,7 @@ if defined?(Gem) and defined?(Gem::PackageTask)
138
142
  desc 'Creates a json.gemspec file'
139
143
  task :gemspec_ext => :version do
140
144
  File.open('json.gemspec', 'w') do |gemspec|
141
- gemspec.write spec_ext.to_ruby
145
+ gemspec.write skip_sdoc(spec_ext.to_ruby)
142
146
  end
143
147
  end
144
148
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.4
1
+ 1.7.5
@@ -5,6 +5,27 @@
5
5
  #include "ruby.h"
6
6
  #include <assert.h>
7
7
 
8
+ #ifndef RHASH_SIZE
9
+ #define RHASH_SIZE(hsh) (RHASH(hsh)->tbl->num_entries)
10
+ #endif
11
+
12
+ #ifndef RFLOAT_VALUE
13
+ #define RFLOAT_VALUE(val) (RFLOAT(val)->value)
14
+ #endif
15
+
16
+ #ifndef RARRAY_PTR
17
+ #define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr
18
+ #endif
19
+ #ifndef RARRAY_LEN
20
+ #define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len
21
+ #endif
22
+ #ifndef RSTRING_PTR
23
+ #define RSTRING_PTR(string) RSTRING(string)->ptr
24
+ #endif
25
+ #ifndef RSTRING_LEN
26
+ #define RSTRING_LEN(string) RSTRING(string)->len
27
+ #endif
28
+
8
29
  #ifdef HAVE_RUBY_ENCODING_H
9
30
  #include "ruby/encoding.h"
10
31
  #define FORCE_UTF8(obj) rb_enc_associate((obj), rb_utf8_encoding())
@@ -864,7 +864,7 @@ static int isArrayOrObject(VALUE string)
864
864
  if (string_len < 2) return 0;
865
865
  for (; p < q && isspace(*p); p++);
866
866
  for (; q > p && isspace(*q); q--);
867
- return *p == '[' && *q == ']' || *p == '{' && *q == '}';
867
+ return (*p == '[' && *q == ']') || (*p == '{' && *q == '}');
868
868
  }
869
869
 
870
870
  /*
@@ -16,27 +16,6 @@
16
16
 
17
17
  #define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
18
18
 
19
- #ifndef RHASH_SIZE
20
- #define RHASH_SIZE(hsh) (RHASH(hsh)->tbl->num_entries)
21
- #endif
22
-
23
- #ifndef RFLOAT_VALUE
24
- #define RFLOAT_VALUE(val) (RFLOAT(val)->value)
25
- #endif
26
-
27
- #ifndef RARRAY_PTR
28
- #define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr
29
- #endif
30
- #ifndef RARRAY_LEN
31
- #define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len
32
- #endif
33
- #ifndef RSTRING_PTR
34
- #define RSTRING_PTR(string) RSTRING(string)->ptr
35
- #endif
36
- #ifndef RSTRING_LEN
37
- #define RSTRING_LEN(string) RSTRING(string)->len
38
- #endif
39
-
40
19
  /* unicode defintions */
41
20
 
42
21
  #define UNI_STRICT_CONVERSION 1
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "json"
5
- s.version = "1.7.4"
5
+ s.version = "1.7.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
9
- s.date = "2012-07-26"
9
+ s.date = "2012-08-17"
10
10
  s.description = "This is a JSON implementation as a Ruby extension in C."
11
11
  s.email = "flori@ping.de"
12
12
  s.extensions = ["ext/json/ext/generator/extconf.rb", "ext/json/ext/parser/extconf.rb"]
@@ -25,13 +25,13 @@ Gem::Specification.new do |s|
25
25
 
26
26
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
27
  s.add_development_dependency(%q<permutation>, [">= 0"])
28
- s.add_development_dependency(%q<sdoc>, [">= 0"])
28
+ s.add_development_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6"
29
29
  else
30
30
  s.add_dependency(%q<permutation>, [">= 0"])
31
- s.add_dependency(%q<sdoc>, [">= 0"])
31
+ s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6"
32
32
  end
33
33
  else
34
34
  s.add_dependency(%q<permutation>, [">= 0"])
35
- s.add_dependency(%q<sdoc>, [">= 0"])
35
+ s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6"
36
36
  end
37
37
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "json_pure"
5
- s.version = "1.7.4"
5
+ s.version = "1.7.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
9
- s.date = "2012-07-26"
9
+ s.date = "2012-08-17"
10
10
  s.description = "This is a JSON implementation in pure Ruby."
11
11
  s.email = "flori@ping.de"
12
12
  s.extra_rdoc_files = ["README.rdoc"]
@@ -24,16 +24,16 @@ Gem::Specification.new do |s|
24
24
 
25
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
26
  s.add_development_dependency(%q<permutation>, [">= 0"])
27
- s.add_development_dependency(%q<sdoc>, [">= 0"])
27
+ s.add_development_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6"
28
28
  s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
29
29
  else
30
30
  s.add_dependency(%q<permutation>, [">= 0"])
31
- s.add_dependency(%q<sdoc>, [">= 0"])
31
+ s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6"
32
32
  s.add_dependency(%q<rake>, ["~> 0.9.2"])
33
33
  end
34
34
  else
35
35
  s.add_dependency(%q<permutation>, [">= 0"])
36
- s.add_dependency(%q<sdoc>, [">= 0"])
36
+ s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6"
37
37
  s.add_dependency(%q<rake>, ["~> 0.9.2"])
38
38
  end
39
39
  end
@@ -1,6 +1,6 @@
1
1
  module JSON
2
2
  # JSON version
3
- VERSION = '1.7.4'
3
+ VERSION = '1.7.5'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-26 00:00:00.000000000 Z
12
+ date: 2012-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: permutation
@@ -32,17 +32,17 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
35
+ - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: '0'
37
+ version: 0.3.16
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: 0.3.16
46
46
  description: This is a JSON implementation as a Ruby extension in C.
47
47
  email: flori@ping.de
48
48
  executables: []
@@ -185,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  segments:
187
187
  - 0
188
- hash: -3133569121088947783
188
+ hash: -4374131742481169366
189
189
  required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  none: false
191
191
  requirements: