34 lines
502 B
Plaintext
34 lines
502 B
Plaintext
When a closure contains only a ``++return++`` statement, the ``++return++`` itself can be omitted.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
someList.sort { a, b in
|
|
return a > b
|
|
}
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
someList.sort { a, b in a > b }
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|