From b507f9e404f86df5447b3088eb5ddd57a98317a7 Mon Sep 17 00:00:00 2001 From: tompng Date: Wed, 3 Apr 2024 18:43:24 +0900 Subject: [PATCH] Autoload GenericObject to avoid require ostruct warning in Ruby 3.4 --- lib/json/common.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/json/common.rb b/lib/json/common.rb index 09006601..95098d3b 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -1,8 +1,9 @@ #frozen_string_literal: false require 'json/version' -require 'json/generic_object' module JSON + autoload :GenericObject, 'json/generic_object' + NOT_SET = Object.new.freeze private_constant :NOT_SET