oj 2.14.1 → 2.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/ext/oj/parse.c +8 -0
- data/lib/oj/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ba2532677f201c509765f805bcbcf1cbdddcac7
|
4
|
+
data.tar.gz: 56fc6f4ccc428ac6f07a3453fba0fbd9f0ee6509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/ext/oj/parse.c
CHANGED
@@ -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
|
}
|
data/lib/oj/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|