From 5f167e867e65ea2aba5bfdc305ba17f0e3f52ef2 Mon Sep 17 00:00:00 2001 From: Peter Wagenet Date: Fri, 17 Dec 2021 16:25:38 -0800 Subject: [PATCH] Failing test for struct with block --- smoke/struct-with-block.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 smoke/struct-with-block.rb diff --git a/smoke/struct-with-block.rb b/smoke/struct-with-block.rb new file mode 100644 index 000000000..e8e2ce139 --- /dev/null +++ b/smoke/struct-with-block.rb @@ -0,0 +1,19 @@ +Foo = Struct.new(:foo) do + def foo? + !!foo + end + + private + + def not_foo? + !foo + end +end +__END__ +# Classes +class Foo < Struct[untyped] + attr_accessor foo(): untyped + def foo?: -> bool + private + def not_foo?: -> bool +end