@@ -14,7 +14,7 @@ static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject,
1414
1515static ID i_to_s , i_to_json , i_new , i_indent , i_space , i_space_before ,
1616 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 ,
1818 i_aref , i_send , i_respond_to_p , i_match , i_keys , i_depth ,
1919 i_buffer_initial_length , i_dup ;
2020
@@ -622,8 +622,6 @@ static VALUE cState_configure(VALUE self, VALUE opts)
622622 state -> allow_nan = RTEST (tmp );
623623 tmp = rb_hash_aref (opts , ID2SYM (i_ascii_only ));
624624 state -> ascii_only = RTEST (tmp );
625- tmp = rb_hash_aref (opts , ID2SYM (i_quirks_mode ));
626- state -> quirks_mode = RTEST (tmp );
627625 return self ;
628626}
629627
@@ -657,7 +655,6 @@ static VALUE cState_to_h(VALUE self)
657655 rb_hash_aset (result , ID2SYM (i_array_nl ), rb_str_new (state -> array_nl , state -> array_nl_len ));
658656 rb_hash_aset (result , ID2SYM (i_allow_nan ), state -> allow_nan ? Qtrue : Qfalse );
659657 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 );
661658 rb_hash_aset (result , ID2SYM (i_max_nesting ), LONG2FIX (state -> max_nesting ));
662659 rb_hash_aset (result , ID2SYM (i_depth ), LONG2FIX (state -> depth ));
663660 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)
943940 * * *allow_nan*: true if NaN, Infinity, and -Infinity should be
944941 * generated, otherwise an exception is thrown, if these values are
945942 * 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.
948943 * * *buffer_initial_length*: sets the initial length of the generator's
949944 * internal buffer.
950945 */
@@ -1251,29 +1246,6 @@ static VALUE cState_ascii_only_p(VALUE self)
12511246 return state -> ascii_only ? Qtrue : Qfalse ;
12521247}
12531248
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-
12771249/*
12781250 * call-seq: depth
12791251 *
@@ -1362,9 +1334,6 @@ void Init_generator(void)
13621334 rb_define_method (cState , "check_circular?" , cState_check_circular_p , 0 );
13631335 rb_define_method (cState , "allow_nan?" , cState_allow_nan_p , 0 );
13641336 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 );
13681337 rb_define_method (cState , "depth" , cState_depth , 0 );
13691338 rb_define_method (cState , "depth=" , cState_depth_set , 1 );
13701339 rb_define_method (cState , "buffer_initial_length" , cState_buffer_initial_length , 0 );
@@ -1416,7 +1385,6 @@ void Init_generator(void)
14161385 i_max_nesting = rb_intern ("max_nesting" );
14171386 i_allow_nan = rb_intern ("allow_nan" );
14181387 i_ascii_only = rb_intern ("ascii_only" );
1419- i_quirks_mode = rb_intern ("quirks_mode" );
14201388 i_depth = rb_intern ("depth" );
14211389 i_buffer_initial_length = rb_intern ("buffer_initial_length" );
14221390 i_pack = rb_intern ("pack" );
0 commit comments