1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/json/ext/parser/parser.c (JSON_parse_string):

associate encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-10-10 08:28:19 +00:00
parent c71e65e92f
commit 5b35f2c137
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Oct 10 17:26:50 2008 NARUSE, Yui <naruse@ruby-lang.org>
* ext/json/ext/parser/parser.c (JSON_parse_string):
associate encoding.
Fri Oct 10 10:18:21 2008 Ryan Davis <ryan@wrath.local> Fri Oct 10 10:18:21 2008 Ryan Davis <ryan@wrath.local>
* lib/test/*: reverted back to test/unit. * lib/test/*: reverted back to test/unit.

View file

@ -1,5 +1,6 @@
#line 1 "parser.rl" #line 1 "parser.rl"
#include "ruby.h" #include "ruby.h"
#include "ruby/encoding.h"
#include "unicode.h" #include "unicode.h"
#define EVIL 0x666 #define EVIL 0x666
@ -1405,6 +1406,7 @@ case 7:
#line 411 "parser.rl" #line 411 "parser.rl"
if (cs >= JSON_string_first_final) { if (cs >= JSON_string_first_final) {
rb_enc_associate(*result, rb_utf8_encoding());
return p + 1; return p + 1;
} else { } else {
return NULL; return NULL;