summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2019-10-21 12:20:19 +0900
committerNobuyoshi Nakada <[email protected]>2019-10-21 15:30:00 +0900
commit431132f037aecc8c9bc783fea257db653c4f8cb0 ()
tree6d1041c8a9ce98b2e622b43f9f514403ca3037db /test
parent215e4b8721d968b83c66c253e6da15b90520f679 (diff)
Pass the called keyword arguments if `keyword_init`
Notes: Merged: https://.com/ruby/ruby/pull/2582
-rw-r--r--test/ruby/test_struct.rb4
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)