Return-Path: X-Original-To: apmail-groovy-commits-archive@minotaur.apache.org Delivered-To: apmail-groovy-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D47818C24 for ; Sat, 12 Dec 2015 09:50:36 +0000 (UTC) Received: (qmail 30533 invoked by uid 500); 12 Dec 2015 09:50:36 -0000 Delivered-To: apmail-groovy-commits-archive@groovy.apache.org Received: (qmail 30503 invoked by uid 500); 12 Dec 2015 09:50:36 -0000 Mailing-List: contact commits-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list commits@groovy.apache.org Received: (qmail 30494 invoked by uid 99); 12 Dec 2015 09:50:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Dec 2015 09:50:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D2F3EE04BE; Sat, 12 Dec 2015 09:50:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: pascalschumacher@apache.org To: commits@groovy.apache.org Message-Id: <3c6f0896305d40859c6ad5a097d6cfe8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: =?utf-8?q?groovy_git_commit=3A_Documentation=3A_style-guide=3A_esc?= =?utf-8?q?aped_-=3E_so_it_does_not_appear_as_=E2=86=92_=28closes_=23212=29?= Date: Sat, 12 Dec 2015 09:50:35 +0000 (UTC) Repository: groovy Updated Branches: refs/heads/GROOVY_2_4_X 33319ff6a -> 7e7f8053e Documentation: style-guide: escaped -> so it does not appear as → (closes #212) Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/7e7f8053 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/7e7f8053 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/7e7f8053 Branch: refs/heads/GROOVY_2_4_X Commit: 7e7f8053e81202cfda576e1609cddd4a4e7e58da Parents: 33319ff Author: Andrew Reitz Authored: Fri Dec 11 21:56:43 2015 -0600 Committer: pascalschumacher Committed: Sat Dec 12 10:50:25 2015 +0100 ---------------------------------------------------------------------- src/spec/doc/style-guide.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/7e7f8053/src/spec/doc/style-guide.adoc ---------------------------------------------------------------------- diff --git a/src/spec/doc/style-guide.adoc b/src/spec/doc/style-guide.adoc index 72462e3..d7eb9c5 100644 --- a/src/spec/doc/style-guide.adoc +++ b/src/spec/doc/style-guide.adoc @@ -391,7 +391,7 @@ For simple variables, or `variable.property`, you can even drop the curly braces throw new Exception("Unable to convert resource: $resource") ---- -You can even lazily evaluate those expressions using a closure notation with `${-> resource }`. +You can even lazily evaluate those expressions using a closure notation with `${\-> resource }`. When the GString will be coerced to a String, it'll evaluate the closure and get the `toString()` representation of the return value. Example: