diff options
author | nick evans <[email protected]> | 2024-10-28 15:41:01 -0400 |
---|---|---|
committer | git <[email protected]> | 2025-05-01 17:52:13 +0000 |
commit | a397e4d4b0a0e7e8499a33ec760dba97ce494c63 () | |
tree | 5781fd294aede7309847dbfd90c217c0067cfc63 /ext | |
parent | bd1d6e8cd725e84addfac8583634458a624929ae (diff) |
[ruby/psych] Add support for ruby 3.2 Data objects
https://.com/ruby/psych/commit/788b844c83
-rw-r--r-- | ext/psych/lib/psych/class_loader.rb | 1 | ||||
-rw-r--r-- | ext/psych/lib/psych/visitors/to_ruby.rb | 22 | ||||
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 10 |
3 files changed, 33 insertions, 0 deletions
@@ -6,6 +6,7 @@ module Psych class ClassLoader # :nodoc: BIG_DECIMAL = 'BigDecimal' COMPLEX = 'Complex' DATE = 'Date' DATE_TIME = 'DateTime' EXCEPTION = 'Exception' @@ -197,6 +197,14 @@ module Psych s end when /^!ruby\/object:?(.*)?$/ name = $1 || 'Object' @@ -340,6 +348,20 @@ module Psych list end def revive_hash hash, o, tagged= false o.children.each_slice(2) { |k,v| key = accept(k) @@ -162,6 +162,16 @@ module Psych alias :visit_Delegator :visit_Object def visit_Struct o tag = ['!ruby/struct', o.class.name].compact.join(':') |