summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_marshal.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 80ec0b1684..e269428dda 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -772,4 +772,11 @@ class TestMarshal < Test::Unit::TestCase
Marshal.dump(Bug12974.new)
end
end
+
+ Bug14314 = Struct.new(:foo, keyword_init: true)
+
+ def test_marshal_keyword_init_struct
+ obj = Bug14314.new(foo: 42)
+ assert_equal obj, Marshal.load(Marshal.dump(obj))
+ end
end