lib/rubocop/cop/lint/else_layout.rb in rubocop-0.42.0 vs lib/rubocop/cop/lint/else_layout.rb in rubocop-0.43.0
- old
+ new
@@ -35,10 +35,10 @@
check_if(node) if if?(node)
end
def check_else(node)
_cond, _if_branch, else_branch = *node
- return unless else_branch && else_branch.type == :begin
+ return unless else_branch && else_branch.begin_type?
first_else_expr = else_branch.children.first
return unless first_else_expr.source_range.line == node.loc.else.line
add_offense(first_else_expr, :expression, message)