Return-Path: X-Original-To: apmail-groovy-users-archive@minotaur.apache.org Delivered-To: apmail-groovy-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2A892183E7 for ; Thu, 9 Jul 2015 17:09:01 +0000 (UTC) Received: (qmail 79212 invoked by uid 500); 9 Jul 2015 17:09:01 -0000 Delivered-To: apmail-groovy-users-archive@groovy.apache.org Received: (qmail 79177 invoked by uid 500); 9 Jul 2015 17:09:01 -0000 Mailing-List: contact users-help@groovy.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.incubator.apache.org Delivered-To: mailing list users@groovy.incubator.apache.org Received: (qmail 79167 invoked by uid 99); 9 Jul 2015 17:09:00 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2015 17:09:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7DA231817A4 for ; Thu, 9 Jul 2015 17:09:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.9 X-Spam-Level: *** X-Spam-Status: No, score=3.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id jToJRvzprXtF for ; Thu, 9 Jul 2015 17:08:50 +0000 (UTC) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 7A22E4741F for ; Thu, 9 Jul 2015 17:08:50 +0000 (UTC) Received: by pacws9 with SMTP id ws9so155030617pac.0 for ; Thu, 09 Jul 2015 10:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=iyDVUT0lrKVxkVHZM0BvI2o0k9kYD5+cjO0QvyMy1tw=; b=gT4dmEKp4vWxR1z/NC8mg+Ro/cqB9OnnYQh9/x1ZRUAx4p1MSl6oHat93dNH5J0qxi odUsEgDrE9XfOSGbBtri7a+7OJYpyEw4QjtsA2RSDqY+t7u8C0Kd+1OGGapeAtd6fAj6 CzIxaR/766DJXK3b7mGDBCWGkMEMBeA1N9uJ6NbkWzMhM1zp9lLrP3eOuhKCCVPuxTG/ 1fPbZIEPv3N1Hinb7s9TEddG5uowQZGXQ4s3zkx7Vu6dCWQXwHIQRaA+DUdft6Xr/XHF GLXN28h4vx3yPgkNleuurblsEeO3SqRPdzGgIm5leGU53OHvEINmMdVKu0dHwuzr6jMy AacQ== X-Received: by 10.70.131.130 with SMTP id om2mr10607572pdb.122.1436461679327; Thu, 09 Jul 2015 10:07:59 -0700 (PDT) Received: from rl1397us.rlcorp.local ([216.52.209.1]) by smtp.gmail.com with ESMTPSA id fl6sm2113454pab.12.2015.07.09.10.07.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Jul 2015 10:07:58 -0700 (PDT) From: Les Hartzman Content-Type: multipart/alternative; boundary="Apple-Mail=_F1350C1F-D439-4263-9ADE-581E55F096AE" Message-Id: <106705D8-FF20-4B4F-B40D-6194D73F7555@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: New to Groovy - question on code in documentation Date: Thu, 9 Jul 2015 10:07:58 -0700 References: <0A4C6A8D-5D4C-487F-8365-084537A126B6@gmail.com> To: "users@groovy.incubator.apache.org" In-Reply-To: X-Mailer: Apple Mail (2.2102) --Apple-Mail=_F1350C1F-D439-4263-9ADE-581E55F096AE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Thanks! I=E2=80=99ll go read that part of the docs. > On Jul 9, 2015, at 10:06 AM, C=C3=A9dric Champeau = wrote: >=20 > Not in that context :) But in the context of the FileTreeBuilder, it = is! >=20 > See = http://docs.groovy-lang.org/2.4.4-SNAPSHOT/html/documentation/#_filetreebu= ilder = >=20 >=20 > 2015-07-09 19:03 GMT+02:00 Les Hartzman >: > Glad I could help! :-) >=20 > So that syntax on the assignment to =E2=80=98file=E2=80=99 is not = legal? >=20 >> On Jul 9, 2015, at 10:00 AM, C=C3=A9dric Champeau = > wrote: >>=20 >> Oh, that's a good catch. this shouldn't appear in the docs. It's a = side effect of an unclosed tag in our test files: >>=20 >> = https://github.com/melix/groovy-core/blob/bf8c4b54863ddf045760fb55db60c098= a8df3616/src/spec/test/gdk/WorkingWithIOSpecTest.groovy#L313-323 = >>=20 >> The end:: tag doesn't correspond to the opening tag::, so asciidoctor = scrambled the output. Will fix it! >>=20 >>=20 >>=20 >> 2015-07-09 18:53 GMT+02:00 Les Hartzman >: >> Hi, >>=20 >> As the subject says, I=E2=80=99ve just gotten started with learning = Groovy and have been going through the documentation. >>=20 >> There is some code in the section on files that is not explained. If = someone could clarify that, it would be great: >>=20 >> doInTmpDir { b -> >> File file =3D null >> def tmpDir =3D b.tmp { >> file =3D 'foo.tmp'('foo') >> } >> What does =E2=80=98foo.tmp=E2=80=99(=E2=80=98foo=E2=80=99) do? >> I tried to put this into groovysh but it complained: No signature of = method: groovysh_evaluate.foo.tmp() is applicable for argument types: = (java.lang.String) values: [foo] >>=20 >> Thanks in advance. >> Les >>=20 >>=20 >>=20 >=20 >=20 --Apple-Mail=_F1350C1F-D439-4263-9ADE-581E55F096AE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Thanks! I=E2=80=99ll go read that part of the docs.

On Jul 9, 2015, at 10:06 AM, C=C3=A9dric Champeau <cedric.champeau@gmail.com> wrote:

Not in that context :) But in the context of = the FileTreeBuilder, it is!

See http://docs.groovy-lang.org/2.4.4-SNAPSHOT/html/documentation/#= _filetreebuilder


2015-07-09 19:03 GMT+02:00 Les Hartzman <lhartzman@gmail.com>:
Glad I could help! :-)

So that syntax on the = assignment to =E2=80=98file=E2=80=99 is not legal?

On Jul = 9, 2015, at 10:00 AM, C=C3=A9dric Champeau <cedric.champeau@gmail.com> wrote:

Oh,= that's a good catch. this shouldn't appear in the docs. It's a side = effect of an unclosed tag in our test files:

https://github.com/melix/groovy-core/blob/bf8c4b54863ddf045760f= b55db60c098a8df3616/src/spec/test/gdk/WorkingWithIOSpecTest.groovy#L313-32= 3

The end:: tag doesn't = correspond to the opening tag::, so asciidoctor scrambled the output. = Will fix it!



2015-07-09 18:53 GMT+02:00 Les Hartzman <lhartzman@gmail.com>:
Hi,

As the subject says, I=E2=80=99ve just = gotten started with learning Groovy and have been going through the = documentation.

There is some code in the section on files that is not = explained. If someone could clarify that, it would be great:

 doInTmpDir { b ->
                File =
file =3D null
                def =
tmpDir =3D b.tmp {
                    file =3D 'foo.tmp'('foo')
            }
What does =E2=80=98foo.tmp=E2=80=99(=E2=80=98foo=E2=80=99) =
do?
I tried to put this into groovysh but it =
complained:  No signature of method: groovysh_evaluate.foo.tmp() is =
applicable for argument types: (java.lang.String) values: =
[foo]

Thanks in =
advance.
Les






= --Apple-Mail=_F1350C1F-D439-4263-9ADE-581E55F096AE--