oj 2.14.1 → 2.14.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e5d3a7192d7fefd4923450eb9ca27fa3e480f53
4
- data.tar.gz: 96278a7d936f76e660b8ae89ccfe25550cd75a77
3
+ metadata.gz: 5ba2532677f201c509765f805bcbcf1cbdddcac7
4
+ data.tar.gz: 56fc6f4ccc428ac6f07a3453fba0fbd9f0ee6509
5
5
  SHA512:
6
- metadata.gz: b457b1f450686bc06d0e196bdf3e683fc16a835d8dd790b22592fce7cc1e911b42f61258c16aab45cb49a7c38496ffe3dc3b54a6dc320861032166e8690a98ec
7
- data.tar.gz: 937af1a3a9270efe743e0a475510f4ca6f64d87ba04cdc1cd94ea5b0590b50e95f2eff8adf5e453cc04640ae99bfac5cbb7144546675623d0d727603f5e7653a
6
+ metadata.gz: 80690fabb4c159ef4bafebe48843da2f7e6de4e5236545163472575fe555458e2e57a78e4d823c64ae9a1f37d34f4b6af8bc33b106d73243600b2d8a92c143b4
7
+ data.tar.gz: c17262ab7020f38281534b821f7541d9a5b1cc3b193ac0ed404f0f241819907a9631dc96b248720ffb944b1c2b6ac6e38893801b4e176b8fa67e4ff4f82030ab
data/README.md CHANGED
@@ -159,6 +159,10 @@ Oj.default_options = {:mode => :compat }
159
159
 
160
160
  ## Releases
161
161
 
162
+ **Release 2.14.2**
163
+
164
+ - Non-UTF-8 string input is now converted to UTF-8.
165
+
162
166
  **Release 2.14.1**
163
167
 
164
168
  - Fixed bug that reverted to BigDecimal when a decimal had preceeding zeros
@@ -771,8 +771,16 @@ protect_parse(VALUE pip) {
771
771
  return Qnil;
772
772
  }
773
773
 
774
+ extern int oj_utf8_index;
774
775
  void
775
776
  oj_pi_set_input_str(ParseInfo pi, volatile VALUE input) {
777
+ #if HAS_ENCODING_SUPPORT
778
+ rb_encoding *enc = rb_to_encoding(rb_obj_encoding(input));
779
+
780
+ if (rb_utf8_encoding() != enc) {
781
+ input = rb_str_conv_enc(input, enc, rb_utf8_encoding());
782
+ }
783
+ #endif
776
784
  pi->json = rb_string_value_ptr((VALUE*)&input);
777
785
  pi->end = pi->json + RSTRING_LEN(input);
778
786
  }
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '2.14.1'
4
+ VERSION = '2.14.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.14.1
4
+ version: 2.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2015-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler