diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-10-21 12:20:19 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-10-21 15:30:00 +0900 |
commit | 431132f037aecc8c9bc783fea257db653c4f8cb0 () | |
tree | 6d1041c8a9ce98b2e622b43f9f514403ca3037db /test/ruby/test_struct.rb | |
parent | 215e4b8721d968b83c66c253e6da15b90520f679 (diff) |
Pass the called keyword arguments if `keyword_init`
Notes: Merged: https://.com/ruby/ruby/pull/2582
-rw-r--r-- | test/ruby/test_struct.rb | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -112,6 +112,10 @@ module TestStruct assert_equal @Struct::KeywordInitTrue.new(a: 1, b: 2).values, @Struct::KeywordInitFalse.new(1, 2).values assert_equal "#{@Struct}::KeywordInitFalse", @Struct::KeywordInitFalse.inspect assert_equal "#{@Struct}::KeywordInitTrue(keyword_init: true)", @Struct::KeywordInitTrue.inspect @Struct.instance_eval do remove_const(:KeywordInitTrue) |