Redundant 'return' statement
Reports redundant return
keywords and statements. A return
keyword is not necessary for the last value in methods and control flow statements.
Since Ruby 1.8, return
statements inside assignment methods are redundant because the return value is always equal to the parameter value.
Inspection options
Option | Type | Default |
---|---|---|
Warn about multiple values in return statement | Checkbox | true |
Inspection Details | |
---|---|
Available in: | Qodana for Ruby 2023.3, RubyMine 2023.3 |
Plugin: | Ruby, 233.SNAPSHOT |
Last modified: 13 July 2023