Inspectopedia
 
2024.3

Mismatched return type

Warning
New
Last modified: 03 December 2024

Reports method and block return values whose inferred types don't match the method's expected return type. The expected return type is taken from either of:

  • The RBS type signature

  • The Sorbet type signature

  • The YARD @return tag

Example: