diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-29 15:52:32 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-29 15:52:32 +0900 |
commit | b3413914d949677fb975824b23d3e66dc0fa2fbe (patch) | |
tree | 34176103668393b155fbebcfd3716ccd5991fce8 /test/ostruct | |
parent | 1e04571da07ed742efa3cb33b4b3aa1089314d51 (diff) | |
download | ruby-b3413914d949677fb975824b23d3e66dc0fa2fbe.tar.gz |
Partly picked from https://github.com/ruby/ostruct/commit/20d0b8c065392a22ba6d74194cf116755f38337f
Diffstat (limited to 'test/ostruct')
-rw-r--r-- | test/ostruct/test_ostruct.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb index d857d5c66a..1fd7d87811 100644 --- a/test/ostruct/test_ostruct.rb +++ b/test/ostruct/test_ostruct.rb @@ -375,7 +375,7 @@ class TC_OpenStruct < Test::Unit::TestCase o = OpenStruct.new(table: {foo: 42}) assert_equal({foo: 42}, YAML.safe_load(YAML.dump(o), permitted_classes: [Symbol, OpenStruct]).table) - end + end if RUBY_VERSION >= '2.6' def test_yaml h = {name: "John Smith", age: 70, pension: 300.42} @@ -386,7 +386,7 @@ class TC_OpenStruct < Test::Unit::TestCase assert_equal os1, os2 assert_equal true, os1.eql?(os2) assert_equal 300.42, os2.pension - end + end if RUBY_VERSION >= '2.6' def test_marshal o = OpenStruct.new(name: "John Smith", age: 70, pension: 300.42) |