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

data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.3 (August 25th, 2009)
4
+ * Fixed a bug in the JSON gem compatibility API where strings weren't being properly escaped
5
+
3
6
  ## 0.6.2 (August 25th, 2009)
4
7
  * Fixed a bug surfaced by an existing library providing a to_json method, and Yajl would double-quote the values provided
5
8
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 6
3
- :patch: 2
3
+ :patch: 3
4
4
  :major: 0
data/lib/yajl.rb CHANGED
@@ -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.6.2"
16
+ VERSION = "0.6.3"
17
17
 
18
18
  class Parser
19
19
  # A helper method for parse-and-forget use-cases
@@ -8,7 +8,7 @@ Yajl::Encoder.enable_json_gem_compatability
8
8
  # Our fallback to_json definition
9
9
  class Object
10
10
  def to_json(*args, &block)
11
- to_s
11
+ "\"#{to_s}\""
12
12
  end
13
13
  end
14
14
 
@@ -53,16 +53,16 @@ describe "JSON Gem compatability API" do
53
53
 
54
54
  it "should encode arbitrary classes via their default to_json method" do
55
55
  d = Dummy.new
56
- d.to_json.should == "#{d.to_s}"
56
+ d.to_json.should == "\"#{d.to_s}\""
57
57
 
58
58
  t = Time.now
59
- t.to_json.should == "#{t.to_s}"
59
+ t.to_json.should == "\"#{t.to_s}\""
60
60
 
61
61
  da = Date.today
62
- da.to_json.should == "#{da.to_s}"
62
+ da.to_json.should == "\"#{da.to_s}\""
63
63
 
64
64
  dt = DateTime.new
65
- dt.to_json.should == "#{dt.to_s}"
65
+ dt.to_json.should == "\"#{dt.to_s}\""
66
66
  end
67
67
 
68
68
  context "ported tests for Unicode" do
data/yajl-ruby.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yajl-ruby}
8
- s.version = "0.6.2"
8
+ s.version = "0.6.3"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yajl-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Lopez