Skip to content

Commit

Permalink
Adjust indent
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Apr 23, 2023
1 parent c89e2fc commit 884b3a6
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions test/rbs/rb_prototype_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,36 +234,36 @@ def when_last_is_nil: () -> nil
end

def test_defs_return_type_with_block_optional
parser = RB.new
parser = RB.new

rb = <<~'EOR'
class Hello
def with_optional_block1
# `block_given?` call makes the block optional
if block_given?
yield 1
end
rb = <<~'EOR'
class Hello
def with_optional_block1
# `block_given?` call makes the block optional
if block_given?
yield 1
end
end
def with_optional_block2(&block)
# testing block var makes the block optional
if block
yield 1
end
def with_optional_block2(&block)
# testing block var makes the block optional
if block
yield 1
end
end
EOR
end
EOR

parser.parse(rb)
parser.parse(rb)

assert_write parser.decls, <<~EOF
class Hello
def with_optional_block1: () ?{ (untyped) -> untyped } -> (untyped | nil)
assert_write parser.decls, <<~EOF
class Hello
def with_optional_block1: () ?{ (untyped) -> untyped } -> (untyped | nil)
def with_optional_block2: () ?{ (untyped) -> untyped } -> (untyped | nil)
end
EOF
end
def with_optional_block2: () ?{ (untyped) -> untyped } -> (untyped | nil)
end
EOF
end

def test_defs_return_type_with_if
parser = RB.new
Expand Down

0 comments on commit 884b3a6

Please sign in to comment.