oj 3.13.23 → 3.16.9
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 +4 -4
 - data/CHANGELOG.md +81 -0
 - data/README.md +2 -2
 - data/ext/oj/buf.h +7 -6
 - data/ext/oj/cache.c +29 -26
 - data/ext/oj/cache.h +3 -2
 - data/ext/oj/cache8.c +10 -9
 - data/ext/oj/circarray.c +7 -5
 - data/ext/oj/circarray.h +2 -2
 - data/ext/oj/code.c +5 -12
 - data/ext/oj/code.h +2 -2
 - data/ext/oj/compat.c +20 -60
 - data/ext/oj/custom.c +26 -59
 - data/ext/oj/debug.c +3 -9
 - data/ext/oj/dump.c +103 -53
 - data/ext/oj/dump.h +1 -4
 - data/ext/oj/dump_compat.c +557 -592
 - data/ext/oj/dump_leaf.c +3 -5
 - data/ext/oj/dump_object.c +42 -48
 - data/ext/oj/dump_strict.c +10 -22
 - data/ext/oj/encoder.c +1 -1
 - data/ext/oj/err.c +2 -13
 - data/ext/oj/err.h +9 -12
 - data/ext/oj/extconf.rb +16 -7
 - data/ext/oj/fast.c +60 -92
 - data/ext/oj/intern.c +62 -47
 - data/ext/oj/intern.h +3 -7
 - data/ext/oj/mem.c +318 -0
 - data/ext/oj/mem.h +53 -0
 - data/ext/oj/mimic_json.c +51 -32
 - data/ext/oj/object.c +33 -43
 - data/ext/oj/odd.c +8 -6
 - data/ext/oj/odd.h +4 -4
 - data/ext/oj/oj.c +243 -212
 - data/ext/oj/oj.h +83 -81
 - data/ext/oj/parse.c +94 -148
 - data/ext/oj/parse.h +21 -24
 - data/ext/oj/parser.c +80 -67
 - data/ext/oj/parser.h +7 -8
 - data/ext/oj/rails.c +70 -92
 - data/ext/oj/reader.c +9 -14
 - data/ext/oj/reader.h +4 -2
 - data/ext/oj/resolve.c +3 -4
 - data/ext/oj/rxclass.c +6 -5
 - data/ext/oj/rxclass.h +1 -1
 - data/ext/oj/saj.c +10 -9
 - data/ext/oj/saj2.c +37 -49
 - data/ext/oj/saj2.h +1 -1
 - data/ext/oj/scp.c +3 -14
 - data/ext/oj/sparse.c +22 -70
 - data/ext/oj/stream_writer.c +45 -41
 - data/ext/oj/strict.c +20 -52
 - data/ext/oj/string_writer.c +64 -38
 - data/ext/oj/trace.h +31 -4
 - data/ext/oj/usual.c +125 -114
 - data/ext/oj/usual.h +7 -6
 - data/ext/oj/util.h +1 -1
 - data/ext/oj/val_stack.c +13 -2
 - data/ext/oj/val_stack.h +8 -7
 - data/ext/oj/wab.c +25 -57
 - data/lib/oj/active_support_helper.rb +1 -3
 - data/lib/oj/bag.rb +7 -1
 - data/lib/oj/easy_hash.rb +4 -5
 - data/lib/oj/error.rb +0 -1
 - data/lib/oj/json.rb +162 -150
 - data/lib/oj/mimic.rb +7 -7
 - data/lib/oj/schandler.rb +5 -4
 - data/lib/oj/state.rb +8 -5
 - data/lib/oj/version.rb +1 -2
 - data/lib/oj.rb +2 -0
 - data/pages/InstallOptions.md +20 -0
 - data/pages/Options.md +4 -0
 - data/test/_test_active.rb +8 -9
 - data/test/_test_active_mimic.rb +7 -8
 - data/test/_test_mimic_rails.rb +17 -20
 - data/test/activerecord/result_test.rb +5 -6
 - data/test/activesupport6/encoding_test.rb +63 -28
 - data/test/activesupport7/abstract_unit.rb +4 -1
 - data/test/activesupport7/encoding_test.rb +72 -22
 - data/test/files.rb +15 -15
 - data/test/foo.rb +18 -69
 - data/test/helper.rb +5 -8
 - data/test/isolated/shared.rb +3 -2
 - data/test/json_gem/json_addition_test.rb +2 -2
 - data/test/json_gem/json_common_interface_test.rb +8 -6
 - data/test/json_gem/json_encoding_test.rb +0 -0
 - data/test/json_gem/json_ext_parser_test.rb +1 -0
 - data/test/json_gem/json_fixtures_test.rb +3 -2
 - data/test/json_gem/json_generator_test.rb +50 -33
 - data/test/json_gem/json_generic_object_test.rb +11 -11
 - data/test/json_gem/json_parser_test.rb +46 -46
 - data/test/json_gem/json_string_matching_test.rb +9 -9
 - data/test/mem.rb +13 -12
 - data/test/perf.rb +21 -26
 - data/test/perf_compat.rb +31 -33
 - data/test/perf_dump.rb +28 -28
 - data/test/perf_fast.rb +80 -82
 - data/test/perf_file.rb +27 -29
 - data/test/perf_object.rb +65 -69
 - data/test/perf_once.rb +12 -11
 - data/test/perf_parser.rb +42 -48
 - data/test/perf_saj.rb +46 -54
 - data/test/perf_scp.rb +57 -69
 - data/test/perf_simple.rb +41 -39
 - data/test/perf_strict.rb +68 -70
 - data/test/perf_wab.rb +67 -69
 - data/test/prec.rb +5 -5
 - data/test/sample/change.rb +0 -1
 - data/test/sample/dir.rb +0 -1
 - data/test/sample/doc.rb +0 -1
 - data/test/sample/file.rb +0 -1
 - data/test/sample/group.rb +0 -1
 - data/test/sample/hasprops.rb +0 -1
 - data/test/sample/layer.rb +0 -1
 - data/test/sample/rect.rb +0 -1
 - data/test/sample/shape.rb +0 -1
 - data/test/sample/text.rb +0 -1
 - data/test/sample.rb +16 -16
 - data/test/sample_json.rb +8 -8
 - data/test/test_compat.rb +81 -54
 - data/test/test_custom.rb +63 -52
 - data/test/test_debian.rb +7 -10
 - data/test/test_fast.rb +86 -90
 - data/test/test_file.rb +24 -29
 - data/test/test_gc.rb +5 -5
 - data/test/test_generate.rb +5 -5
 - data/test/test_hash.rb +4 -4
 - data/test/test_integer_range.rb +9 -9
 - data/test/test_null.rb +20 -20
 - data/test/test_object.rb +92 -87
 - data/test/test_parser.rb +4 -4
 - data/test/test_parser_debug.rb +5 -5
 - data/test/test_parser_saj.rb +27 -25
 - data/test/test_parser_usual.rb +44 -6
 - data/test/test_rails.rb +2 -2
 - data/test/test_saj.rb +10 -8
 - data/test/test_scp.rb +35 -35
 - data/test/test_strict.rb +38 -32
 - data/test/test_various.rb +146 -97
 - data/test/test_wab.rb +46 -44
 - data/test/test_writer.rb +63 -47
 - data/test/tests.rb +7 -7
 - data/test/tests_mimic.rb +6 -6
 - data/test/tests_mimic_addition.rb +6 -6
 - metadata +46 -26
 - data/test/activesupport4/decoding_test.rb +0 -108
 - data/test/activesupport4/encoding_test.rb +0 -531
 - data/test/activesupport4/test_helper.rb +0 -41
 - data/test/activesupport5/abstract_unit.rb +0 -45
 - data/test/activesupport5/decoding_test.rb +0 -133
 - data/test/activesupport5/encoding_test.rb +0 -500
 - data/test/activesupport5/encoding_test_cases.rb +0 -98
 - data/test/activesupport5/test_helper.rb +0 -72
 - data/test/activesupport5/time_zone_test_helpers.rb +0 -39
 - data/test/bar.rb +0 -11
 - data/test/baz.rb +0 -16
 - data/test/bug.rb +0 -16
 - data/test/zoo.rb +0 -13
 
| 
         @@ -1,98 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            require "bigdecimal"
         
     | 
| 
       4 
     | 
    
         
            -
            require "date"
         
     | 
| 
       5 
     | 
    
         
            -
            require "time"
         
     | 
| 
       6 
     | 
    
         
            -
            require "pathname"
         
     | 
| 
       7 
     | 
    
         
            -
            require "uri"
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            module JSONTest
         
     | 
| 
       10 
     | 
    
         
            -
              class Foo
         
     | 
| 
       11 
     | 
    
         
            -
                def initialize(a, b)
         
     | 
| 
       12 
     | 
    
         
            -
                  @a, @b = a, b
         
     | 
| 
       13 
     | 
    
         
            -
                end
         
     | 
| 
       14 
     | 
    
         
            -
              end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
              class Hashlike
         
     | 
| 
       17 
     | 
    
         
            -
                def to_hash
         
     | 
| 
       18 
     | 
    
         
            -
                  { foo: "hello", bar: "world" }
         
     | 
| 
       19 
     | 
    
         
            -
                end
         
     | 
| 
       20 
     | 
    
         
            -
              end
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
              class Custom
         
     | 
| 
       23 
     | 
    
         
            -
                def initialize(serialized)
         
     | 
| 
       24 
     | 
    
         
            -
                  @serialized = serialized
         
     | 
| 
       25 
     | 
    
         
            -
                end
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                def as_json(options = nil)
         
     | 
| 
       28 
     | 
    
         
            -
                  @serialized
         
     | 
| 
       29 
     | 
    
         
            -
                end
         
     | 
| 
       30 
     | 
    
         
            -
              end
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
              MyStruct = Struct.new(:name, :value) do
         
     | 
| 
       33 
     | 
    
         
            -
                def initialize(*)
         
     | 
| 
       34 
     | 
    
         
            -
                  @unused = "unused instance variable"
         
     | 
| 
       35 
     | 
    
         
            -
                  super
         
     | 
| 
       36 
     | 
    
         
            -
                end
         
     | 
| 
       37 
     | 
    
         
            -
              end
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
              module EncodingTestCases
         
     | 
| 
       40 
     | 
    
         
            -
                TrueTests     = [[ true,  %(true)  ]]
         
     | 
| 
       41 
     | 
    
         
            -
                FalseTests    = [[ false, %(false) ]]
         
     | 
| 
       42 
     | 
    
         
            -
                NilTests      = [[ nil,   %(null)  ]]
         
     | 
| 
       43 
     | 
    
         
            -
                NumericTests  = [[ 1,     %(1)     ],
         
     | 
| 
       44 
     | 
    
         
            -
                                 [ 2.5,   %(2.5)   ],
         
     | 
| 
       45 
     | 
    
         
            -
                                 [ 0.0 / 0.0,   %(null) ],
         
     | 
| 
       46 
     | 
    
         
            -
                                 [ 1.0 / 0.0,   %(null) ],
         
     | 
| 
       47 
     | 
    
         
            -
                                 [ -1.0 / 0.0,  %(null) ],
         
     | 
| 
       48 
     | 
    
         
            -
                                 [ BigDecimal("0.0") / BigDecimal("0.0"),  %(null) ],
         
     | 
| 
       49 
     | 
    
         
            -
                                 [ BigDecimal("2.5"), %("#{BigDecimal('2.5')}") ]]
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
                StringTests   = [[ "this is the <string>",     %("this is the \\u003cstring\\u003e")],
         
     | 
| 
       52 
     | 
    
         
            -
                                 [ 'a "string" with quotes & an ampersand', %("a \\"string\\" with quotes \\u0026 an ampersand") ],
         
     | 
| 
       53 
     | 
    
         
            -
                                 [ "http://test.host/posts/1", %("http://test.host/posts/1")],
         
     | 
| 
       54 
     | 
    
         
            -
                                 [ "Control characters: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\u2028\u2029",
         
     | 
| 
       55 
     | 
    
         
            -
                                   %("Control characters: \\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f\\u2028\\u2029") ]]
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
                ArrayTests    = [[ ["a", "b", "c"],          %([\"a\",\"b\",\"c\"])        ],
         
     | 
| 
       58 
     | 
    
         
            -
                                 [ [1, "a", :b, nil, false], %([1,\"a\",\"b\",null,false]) ]]
         
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
                HashTests     = [[ { foo: "bar" }, %({\"foo\":\"bar\"}) ],
         
     | 
| 
       61 
     | 
    
         
            -
                                 [ { 1 => 1, 2 => "a", 3 => :b, 4 => nil, 5 => false }, %({\"1\":1,\"2\":\"a\",\"3\":\"b\",\"4\":null,\"5\":false}) ]]
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                RangeTests    = [[ 1..2,     %("1..2")],
         
     | 
| 
       64 
     | 
    
         
            -
                                 [ 1...2,    %("1...2")],
         
     | 
| 
       65 
     | 
    
         
            -
                                 [ 1.5..2.5, %("1.5..2.5")]]
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
                SymbolTests   = [[ :a,     %("a")    ],
         
     | 
| 
       68 
     | 
    
         
            -
                                 [ :this,  %("this") ],
         
     | 
| 
       69 
     | 
    
         
            -
                                 [ :"a b", %("a b")  ]]
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
                ObjectTests   = [[ Foo.new(1, 2), %({\"a\":1,\"b\":2}) ]]
         
     | 
| 
       72 
     | 
    
         
            -
                HashlikeTests = [[ Hashlike.new, %({\"bar\":\"world\",\"foo\":\"hello\"}) ]]
         
     | 
| 
       73 
     | 
    
         
            -
                StructTests   = [[ MyStruct.new(:foo, "bar"), %({\"name\":\"foo\",\"value\":\"bar\"}) ],
         
     | 
| 
       74 
     | 
    
         
            -
                                 [ MyStruct.new(nil, nil), %({\"name\":null,\"value\":null}) ]]
         
     | 
| 
       75 
     | 
    
         
            -
                CustomTests   = [[ Custom.new("custom"), '"custom"' ],
         
     | 
| 
       76 
     | 
    
         
            -
                                 [ Custom.new(nil), "null" ],
         
     | 
| 
       77 
     | 
    
         
            -
                                 [ Custom.new(:a), '"a"' ],
         
     | 
| 
       78 
     | 
    
         
            -
                                 [ Custom.new([ :foo, "bar" ]), '["foo","bar"]' ],
         
     | 
| 
       79 
     | 
    
         
            -
                                 [ Custom.new(foo: "hello", bar: "world"), '{"bar":"world","foo":"hello"}' ],
         
     | 
| 
       80 
     | 
    
         
            -
                                 [ Custom.new(Hashlike.new), '{"bar":"world","foo":"hello"}' ],
         
     | 
| 
       81 
     | 
    
         
            -
                                 [ Custom.new(Custom.new(Custom.new(:a))), '"a"' ]]
         
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
                RegexpTests   = [[ /^a/, '"(?-mix:^a)"' ], [/^\w{1,2}[a-z]+/ix, '"(?ix-m:^\\\\w{1,2}[a-z]+)"']]
         
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
                URITests      = [[ URI.parse("http://example.com"), %("http://example.com") ]]
         
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
                PathnameTests = [[ Pathname.new("lib/index.rb"), %("lib/index.rb") ]]
         
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
                DateTests     = [[ Date.new(2005, 2, 1), %("2005/02/01") ]]
         
     | 
| 
       90 
     | 
    
         
            -
                TimeTests     = [[ Time.utc(2005, 2, 1, 15, 15, 10), %("2005/02/01 15:15:10 +0000") ]]
         
     | 
| 
       91 
     | 
    
         
            -
                DateTimeTests = [[ DateTime.civil(2005, 2, 1, 15, 15, 10), %("2005/02/01 15:15:10 +0000") ]]
         
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
                StandardDateTests     = [[ Date.new(2005, 2, 1), %("2005-02-01") ]]
         
     | 
| 
       94 
     | 
    
         
            -
                StandardTimeTests     = [[ Time.utc(2005, 2, 1, 15, 15, 10), %("2005-02-01T15:15:10.000Z") ]]
         
     | 
| 
       95 
     | 
    
         
            -
                StandardDateTimeTests = [[ DateTime.civil(2005, 2, 1, 15, 15, 10), %("2005-02-01T15:15:10.000+00:00") ]]
         
     | 
| 
       96 
     | 
    
         
            -
                StandardStringTests   = [[ "this is the <string>", %("this is the <string>")]]
         
     | 
| 
       97 
     | 
    
         
            -
              end
         
     | 
| 
       98 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,72 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            gem "minitest" # make sure we get the gem, not stdlib
         
     | 
| 
       4 
     | 
    
         
            -
            require "minitest"
         
     | 
| 
       5 
     | 
    
         
            -
            require "active_support/testing/tagged_logging"
         
     | 
| 
       6 
     | 
    
         
            -
            require "active_support/testing/setup_and_teardown"
         
     | 
| 
       7 
     | 
    
         
            -
            require "active_support/testing/assertions"
         
     | 
| 
       8 
     | 
    
         
            -
            require "active_support/testing/deprecation"
         
     | 
| 
       9 
     | 
    
         
            -
            require "active_support/testing/declarative"
         
     | 
| 
       10 
     | 
    
         
            -
            require "active_support/testing/isolation"
         
     | 
| 
       11 
     | 
    
         
            -
            require "active_support/testing/constant_lookup"
         
     | 
| 
       12 
     | 
    
         
            -
            require "active_support/testing/time_helpers"
         
     | 
| 
       13 
     | 
    
         
            -
            require "active_support/testing/file_fixtures"
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            module ActiveSupport
         
     | 
| 
       16 
     | 
    
         
            -
              class TestCase < ::Minitest::Test
         
     | 
| 
       17 
     | 
    
         
            -
                Assertion = Minitest::Assertion
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                class << self
         
     | 
| 
       20 
     | 
    
         
            -
                  # Sets the order in which test cases are run.
         
     | 
| 
       21 
     | 
    
         
            -
                  #
         
     | 
| 
       22 
     | 
    
         
            -
                  #   ActiveSupport::TestCase.test_order = :random # => :random
         
     | 
| 
       23 
     | 
    
         
            -
                  #
         
     | 
| 
       24 
     | 
    
         
            -
                  # Valid values are:
         
     | 
| 
       25 
     | 
    
         
            -
                  # * +:random+   (to run tests in random order)
         
     | 
| 
       26 
     | 
    
         
            -
                  # * +:parallel+ (to run tests in parallel)
         
     | 
| 
       27 
     | 
    
         
            -
                  # * +:sorted+   (to run tests alphabetically by method name)
         
     | 
| 
       28 
     | 
    
         
            -
                  # * +:alpha+    (equivalent to +:sorted+)
         
     | 
| 
       29 
     | 
    
         
            -
                  def test_order=(new_order)
         
     | 
| 
       30 
     | 
    
         
            -
                    ActiveSupport.test_order = new_order
         
     | 
| 
       31 
     | 
    
         
            -
                  end
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                  # Returns the order in which test cases are run.
         
     | 
| 
       34 
     | 
    
         
            -
                  #
         
     | 
| 
       35 
     | 
    
         
            -
                  #   ActiveSupport::TestCase.test_order # => :random
         
     | 
| 
       36 
     | 
    
         
            -
                  #
         
     | 
| 
       37 
     | 
    
         
            -
                  # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+.
         
     | 
| 
       38 
     | 
    
         
            -
                  # Defaults to +:random+.
         
     | 
| 
       39 
     | 
    
         
            -
                  def test_order
         
     | 
| 
       40 
     | 
    
         
            -
                    ActiveSupport.test_order ||= :random
         
     | 
| 
       41 
     | 
    
         
            -
                  end
         
     | 
| 
       42 
     | 
    
         
            -
                end
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
                alias_method :method_name, :name
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                include ActiveSupport::Testing::TaggedLogging
         
     | 
| 
       47 
     | 
    
         
            -
                prepend ActiveSupport::Testing::SetupAndTeardown
         
     | 
| 
       48 
     | 
    
         
            -
                include ActiveSupport::Testing::Assertions
         
     | 
| 
       49 
     | 
    
         
            -
                include ActiveSupport::Testing::Deprecation
         
     | 
| 
       50 
     | 
    
         
            -
                include ActiveSupport::Testing::TimeHelpers
         
     | 
| 
       51 
     | 
    
         
            -
                include ActiveSupport::Testing::FileFixtures
         
     | 
| 
       52 
     | 
    
         
            -
                extend ActiveSupport::Testing::Declarative
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
                # test/unit backwards compatibility methods
         
     | 
| 
       55 
     | 
    
         
            -
                alias :assert_raise :assert_raises
         
     | 
| 
       56 
     | 
    
         
            -
                alias :assert_not_empty :refute_empty
         
     | 
| 
       57 
     | 
    
         
            -
                alias :assert_not_equal :refute_equal
         
     | 
| 
       58 
     | 
    
         
            -
                alias :assert_not_in_delta :refute_in_delta
         
     | 
| 
       59 
     | 
    
         
            -
                alias :assert_not_in_epsilon :refute_in_epsilon
         
     | 
| 
       60 
     | 
    
         
            -
                alias :assert_not_includes :refute_includes
         
     | 
| 
       61 
     | 
    
         
            -
                alias :assert_not_instance_of :refute_instance_of
         
     | 
| 
       62 
     | 
    
         
            -
                alias :assert_not_kind_of :refute_kind_of
         
     | 
| 
       63 
     | 
    
         
            -
                alias :assert_no_match :refute_match
         
     | 
| 
       64 
     | 
    
         
            -
                alias :assert_not_nil :refute_nil
         
     | 
| 
       65 
     | 
    
         
            -
                alias :assert_not_operator :refute_operator
         
     | 
| 
       66 
     | 
    
         
            -
                alias :assert_not_predicate :refute_predicate
         
     | 
| 
       67 
     | 
    
         
            -
                alias :assert_not_respond_to :refute_respond_to
         
     | 
| 
       68 
     | 
    
         
            -
                alias :assert_not_same :refute_same
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
                ActiveSupport.run_load_hooks(:active_support_test_case, self)
         
     | 
| 
       71 
     | 
    
         
            -
              end
         
     | 
| 
       72 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,39 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module TimeZoneTestHelpers
         
     | 
| 
       4 
     | 
    
         
            -
              def with_tz_default(tz = nil)
         
     | 
| 
       5 
     | 
    
         
            -
                old_tz = Time.zone
         
     | 
| 
       6 
     | 
    
         
            -
                Time.zone = tz
         
     | 
| 
       7 
     | 
    
         
            -
                yield
         
     | 
| 
       8 
     | 
    
         
            -
              ensure
         
     | 
| 
       9 
     | 
    
         
            -
                Time.zone = old_tz
         
     | 
| 
       10 
     | 
    
         
            -
              end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
              def with_env_tz(new_tz = "US/Eastern")
         
     | 
| 
       13 
     | 
    
         
            -
                old_tz, ENV["TZ"] = ENV["TZ"], new_tz
         
     | 
| 
       14 
     | 
    
         
            -
                yield
         
     | 
| 
       15 
     | 
    
         
            -
              ensure
         
     | 
| 
       16 
     | 
    
         
            -
                old_tz ? ENV["TZ"] = old_tz : ENV.delete("TZ")
         
     | 
| 
       17 
     | 
    
         
            -
              end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              def with_preserve_timezone(value)
         
     | 
| 
       20 
     | 
    
         
            -
                old_preserve_tz = ActiveSupport.to_time_preserves_timezone
         
     | 
| 
       21 
     | 
    
         
            -
                ActiveSupport.to_time_preserves_timezone = value
         
     | 
| 
       22 
     | 
    
         
            -
                yield
         
     | 
| 
       23 
     | 
    
         
            -
              ensure
         
     | 
| 
       24 
     | 
    
         
            -
                ActiveSupport.to_time_preserves_timezone = old_preserve_tz
         
     | 
| 
       25 
     | 
    
         
            -
              end
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
              def with_tz_mappings(mappings)
         
     | 
| 
       28 
     | 
    
         
            -
                old_mappings = ActiveSupport::TimeZone::MAPPING.dup
         
     | 
| 
       29 
     | 
    
         
            -
                ActiveSupport::TimeZone.clear
         
     | 
| 
       30 
     | 
    
         
            -
                ActiveSupport::TimeZone::MAPPING.clear
         
     | 
| 
       31 
     | 
    
         
            -
                ActiveSupport::TimeZone::MAPPING.merge!(mappings)
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                yield
         
     | 
| 
       34 
     | 
    
         
            -
              ensure
         
     | 
| 
       35 
     | 
    
         
            -
                ActiveSupport::TimeZone.clear
         
     | 
| 
       36 
     | 
    
         
            -
                ActiveSupport::TimeZone::MAPPING.clear
         
     | 
| 
       37 
     | 
    
         
            -
                ActiveSupport::TimeZone::MAPPING.merge!(old_mappings)
         
     | 
| 
       38 
     | 
    
         
            -
              end
         
     | 
| 
       39 
     | 
    
         
            -
            end
         
     | 
    
        data/test/bar.rb
    DELETED
    
    
    
        data/test/baz.rb
    DELETED
    
    | 
         @@ -1,16 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #!/usr/bin/env ruby
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            $: << File.dirname(__FILE__)
         
     | 
| 
       4 
     | 
    
         
            -
            $oj_dir = File.dirname(File.expand_path(File.dirname(__FILE__)))
         
     | 
| 
       5 
     | 
    
         
            -
            %w(lib ext).each do |dir|
         
     | 
| 
       6 
     | 
    
         
            -
              $: << File.join($oj_dir, dir)
         
     | 
| 
       7 
     | 
    
         
            -
            end
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            require 'oj'
         
     | 
| 
       10 
     | 
    
         
            -
            Oj.mimic_JSON()
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
            begin
         
     | 
| 
       13 
     | 
    
         
            -
            ::JSON.load('name=&email=&subject=&comment=&submit=Send+Message')
         
     | 
| 
       14 
     | 
    
         
            -
            rescue ::JSON::ParserError
         
     | 
| 
       15 
     | 
    
         
            -
              puts "*** Pass"
         
     | 
| 
       16 
     | 
    
         
            -
            end
         
     | 
    
        data/test/bug.rb
    DELETED
    
    | 
         @@ -1,16 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            $: << '.'
         
     | 
| 
       2 
     | 
    
         
            -
            $: << File.join(File.dirname(__FILE__), "../lib")
         
     | 
| 
       3 
     | 
    
         
            -
            $: << File.join(File.dirname(__FILE__), "../ext")
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            #require 'bundler/setup'
         
     | 
| 
       7 
     | 
    
         
            -
            require 'oj'
         
     | 
| 
       8 
     | 
    
         
            -
            require 'active_support'
         
     | 
| 
       9 
     | 
    
         
            -
            require 'active_support/time_with_zone'
         
     | 
| 
       10 
     | 
    
         
            -
            require 'tzinfo'
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
            puts ActiveSupport::TimeWithZone
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
            json = File.read('./bug.json')
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            Oj.load(json)
         
     |