Skip to content

Files

Latest commit

 

History

History
22 lines (14 loc) · 447 Bytes

Lint-ItWithoutArgumentsInBlock.md

File metadata and controls

22 lines (14 loc) · 447 Bytes

Pattern: Use of it without argument

Issue: -

Description

it calls without arguments will refer to the first block param in Ruby 3.4. So use it() or self.it to ensure compatibility.

Examples

# bad
do_something { it }

# good
do_something { it() }
do_something { self.it }

Further Reading