yajl-ruby 0.7.7 → 0.7.8

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 yajl-ruby might be problematic. Click here for more details.

@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.8 (September 27th, 2010)
4
+ * bugfix due to improper usage of rb_define_method
5
+ * bugfix to make sure json gem compability API doesn't break ActiveSupport#to_json
6
+ * fix a bug in chunked http response regex (thanks to http://github.com/kevn for catching this)
7
+
3
8
  ## 0.7.7 (July 12th, 2010)
4
9
  * full string encoding support for 1.9, respecting Encoding.default_internal
5
10
  * refactor the #to_json function bodies into a C macro
@@ -1,5 +1,5 @@
1
1
  ---
2
+ :patch: 8
3
+ :build:
2
4
  :major: 0
3
5
  :minor: 7
4
- :patch: 7
5
- :build:
@@ -846,7 +846,7 @@ void Init_yajl_ext() {
846
846
  rb_define_singleton_method(cParser, "new", rb_yajl_parser_new, -1);
847
847
  rb_define_method(cParser, "initialize", rb_yajl_parser_init, -1);
848
848
  rb_define_method(cParser, "parse", rb_yajl_parser_parse, -1);
849
- rb_define_method(cParser, "parse_chunk", rb_yajl_parser_parse_chunk, -1);
849
+ rb_define_method(cParser, "parse_chunk", rb_yajl_parser_parse_chunk, 1);
850
850
  rb_define_method(cParser, "<<", rb_yajl_parser_parse_chunk, 1);
851
851
  rb_define_method(cParser, "on_parse_complete=", rb_yajl_parser_set_complete_cb, 1);
852
852
 
@@ -13,7 +13,7 @@ require 'yajl_ext'
13
13
  #
14
14
  # Ruby bindings to the excellent Yajl (Yet Another JSON Parser) ANSI C library.
15
15
  module Yajl
16
- VERSION = "0.7.7"
16
+ VERSION = "0.7.8"
17
17
 
18
18
  # For compatibility, has the same signature of Yajl::Parser.parse
19
19
  def self.load(str_or_io, options={}, read_bufsize=nil, &block)
@@ -148,7 +148,7 @@ module Yajl
148
148
  if block_given?
149
149
  chunkLeft = 0
150
150
  while !socket.eof? && (line = socket.gets)
151
- break if line.match /0.*?\r\n/
151
+ break if line.match /^0.*?\r\n/
152
152
  next if line == "\r\n"
153
153
  size = line.hex
154
154
  json = socket.read(size)
@@ -6,9 +6,11 @@ require 'yajl' unless defined?(Yajl::Parser)
6
6
  Yajl::Encoder.enable_json_gem_compatability
7
7
 
8
8
  # Our fallback to_json definition
9
- class Object
10
- def to_json(*args, &block)
11
- "\"#{to_s}\""
9
+ unless defined?(ActiveSupport)
10
+ class Object
11
+ def to_json(*args, &block)
12
+ "\"#{to_s}\""
13
+ end
12
14
  end
13
15
  end
14
16
 
@@ -47,4 +49,4 @@ module JSON
47
49
  raise JSON::GeneratorError, e.message
48
50
  end
49
51
  end
50
- end
52
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yajl-ruby}
8
- s.version = "0.7.7"
8
+ s.version = "0.7.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
12
- s.date = %q{2010-07-12}
12
+ s.date = %q{2010-09-27}
13
13
  s.email = %q{seniorlopez@gmail.com}
14
14
  s.extensions = ["ext/extconf.rb"]
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yajl-ruby
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 19
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 7
8
- - 7
9
- version: 0.7.7
9
+ - 8
10
+ version: 0.7.8
10
11
  platform: ruby
11
12
  authors:
12
13
  - Brian Lopez
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-07-12 00:00:00 -07:00
19
+ date: 2010-09-27 00:00:00 -07:00
19
20
  default_executable:
20
21
  dependencies: []
21
22
 
@@ -186,6 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
187
  requirements:
187
188
  - - ">="
188
189
  - !ruby/object:Gem::Version
190
+ hash: 3
189
191
  segments:
190
192
  - 0
191
193
  version: "0"
@@ -194,6 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
196
  requirements:
195
197
  - - ">="
196
198
  - !ruby/object:Gem::Version
199
+ hash: 3
197
200
  segments:
198
201
  - 0
199
202
  version: "0"