@@ -14,7 +14,7 @@ static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject,
14
14
15
15
static ID i_to_s , i_to_json , i_new , i_indent , i_space , i_space_before ,
16
16
i_object_nl , i_array_nl , i_max_nesting , i_allow_nan , i_ascii_only ,
17
- i_quirks_mode , i_pack , i_unpack , i_create_id , i_extend , i_key_p ,
17
+ i_pack , i_unpack , i_create_id , i_extend , i_key_p ,
18
18
i_aref , i_send , i_respond_to_p , i_match , i_keys , i_depth ,
19
19
i_buffer_initial_length , i_dup ;
20
20
@@ -622,8 +622,6 @@ static VALUE cState_configure(VALUE self, VALUE opts)
622
622
state -> allow_nan = RTEST (tmp );
623
623
tmp = rb_hash_aref (opts , ID2SYM (i_ascii_only ));
624
624
state -> ascii_only = RTEST (tmp );
625
- tmp = rb_hash_aref (opts , ID2SYM (i_quirks_mode ));
626
- state -> quirks_mode = RTEST (tmp );
627
625
return self ;
628
626
}
629
627
@@ -657,7 +655,6 @@ static VALUE cState_to_h(VALUE self)
657
655
rb_hash_aset (result , ID2SYM (i_array_nl ), rb_str_new (state -> array_nl , state -> array_nl_len ));
658
656
rb_hash_aset (result , ID2SYM (i_allow_nan ), state -> allow_nan ? Qtrue : Qfalse );
659
657
rb_hash_aset (result , ID2SYM (i_ascii_only ), state -> ascii_only ? Qtrue : Qfalse );
660
- rb_hash_aset (result , ID2SYM (i_quirks_mode ), state -> quirks_mode ? Qtrue : Qfalse );
661
658
rb_hash_aset (result , ID2SYM (i_max_nesting ), LONG2FIX (state -> max_nesting ));
662
659
rb_hash_aset (result , ID2SYM (i_depth ), LONG2FIX (state -> depth ));
663
660
rb_hash_aset (result , ID2SYM (i_buffer_initial_length ), LONG2FIX (state -> buffer_initial_length ));
@@ -943,8 +940,6 @@ static VALUE cState_generate(VALUE self, VALUE obj)
943
940
* * *allow_nan*: true if NaN, Infinity, and -Infinity should be
944
941
* generated, otherwise an exception is thrown, if these values are
945
942
* encountered. This options defaults to false.
946
- * * *quirks_mode*: Enables quirks_mode for parser, that is for example
947
- * generating single JSON values instead of documents is possible.
948
943
* * *buffer_initial_length*: sets the initial length of the generator's
949
944
* internal buffer.
950
945
*/
@@ -1251,29 +1246,6 @@ static VALUE cState_ascii_only_p(VALUE self)
1251
1246
return state -> ascii_only ? Qtrue : Qfalse ;
1252
1247
}
1253
1248
1254
- /*
1255
- * call-seq: quirks_mode?
1256
- *
1257
- * Returns true, if quirks mode is enabled. Otherwise returns false.
1258
- */
1259
- static VALUE cState_quirks_mode_p (VALUE self )
1260
- {
1261
- GET_STATE (self );
1262
- return state -> quirks_mode ? Qtrue : Qfalse ;
1263
- }
1264
-
1265
- /*
1266
- * call-seq: quirks_mode=(enable)
1267
- *
1268
- * If set to true, enables the quirks_mode mode.
1269
- */
1270
- static VALUE cState_quirks_mode_set (VALUE self , VALUE enable )
1271
- {
1272
- GET_STATE (self );
1273
- state -> quirks_mode = RTEST (enable );
1274
- return Qnil ;
1275
- }
1276
-
1277
1249
/*
1278
1250
* call-seq: depth
1279
1251
*
@@ -1362,9 +1334,6 @@ void Init_generator(void)
1362
1334
rb_define_method (cState , "check_circular?" , cState_check_circular_p , 0 );
1363
1335
rb_define_method (cState , "allow_nan?" , cState_allow_nan_p , 0 );
1364
1336
rb_define_method (cState , "ascii_only?" , cState_ascii_only_p , 0 );
1365
- rb_define_method (cState , "quirks_mode?" , cState_quirks_mode_p , 0 );
1366
- rb_define_method (cState , "quirks_mode" , cState_quirks_mode_p , 0 );
1367
- rb_define_method (cState , "quirks_mode=" , cState_quirks_mode_set , 1 );
1368
1337
rb_define_method (cState , "depth" , cState_depth , 0 );
1369
1338
rb_define_method (cState , "depth=" , cState_depth_set , 1 );
1370
1339
rb_define_method (cState , "buffer_initial_length" , cState_buffer_initial_length , 0 );
@@ -1416,7 +1385,6 @@ void Init_generator(void)
1416
1385
i_max_nesting = rb_intern ("max_nesting" );
1417
1386
i_allow_nan = rb_intern ("allow_nan" );
1418
1387
i_ascii_only = rb_intern ("ascii_only" );
1419
- i_quirks_mode = rb_intern ("quirks_mode" );
1420
1388
i_depth = rb_intern ("depth" );
1421
1389
i_buffer_initial_length = rb_intern ("buffer_initial_length" );
1422
1390
i_pack = rb_intern ("pack" );
0 commit comments