You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by jw...@apache.org on 2016/09/09 00:39:50 UTC
[1/2] groovy git commit: Fix mixed code snippet references. (closes
#417)
Repository: groovy
Updated Branches:
refs/heads/GROOVY_2_4_X 776ea2cdf -> fb7ede6e5
Fix mixed code snippet references. (closes #417)
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/fb7ede6e
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/fb7ede6e
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/fb7ede6e
Branch: refs/heads/GROOVY_2_4_X
Commit: fb7ede6e58d660fc914b66b5f88551a8821ecde1
Parents: 97f74ed
Author: Karsten Tinnefeld <k....@gmail.com>
Authored: Fri Sep 9 00:56:17 2016 +0200
Committer: John Wagenleitner <jw...@apache.org>
Committed: Thu Sep 8 17:38:59 2016 -0700
----------------------------------------------------------------------
src/spec/doc/working-with-collections.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/fb7ede6e/src/spec/doc/working-with-collections.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/working-with-collections.adoc b/src/spec/doc/working-with-collections.adoc
index 859a535..2e94c14 100644
--- a/src/spec/doc/working-with-collections.adoc
+++ b/src/spec/doc/working-with-collections.adoc
@@ -433,7 +433,7 @@ It is worth noting that negative indices are allowed, to extract more easily fro
[source,groovy]
---------------------------------
-include::{projectdir}/src/spec/test/gdk/WorkingWithCollectionsTest.groovy[tags=subscript_3,indent=0]
+include::{projectdir}/src/spec/test/gdk/WorkingWithCollectionsTest.groovy[tags=subscript_4,indent=0]
---------------------------------
You can use negative indices to count from the end of the List, array,
@@ -441,7 +441,7 @@ String etc.
[source,groovy]
--------------------------------
-include::{projectdir}/src/spec/test/gdk/WorkingWithCollectionsTest.groovy[tags=subscript_4,indent=0]
+include::{projectdir}/src/spec/test/gdk/WorkingWithCollectionsTest.groovy[tags=subscript_4a,indent=0]
--------------------------------
Eventually, if you use a backwards range (the starting index is greater than
[2/2] groovy git commit: Documentation fixes to [The Groocy
Development Kit](http://groovy-lang.org/groovy-dev-kit.html) section on
Working with collections - property access comment targets entry instead of
key - two introductions followed by two corres
Posted by jw...@apache.org.
Documentation fixes to [The Groocy Development Kit](http://groovy-lang.org/groovy-dev-kit.html) section on Working with collections
- property access comment targets entry instead of key
- two introductions followed by two corresponding code sections
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/97f74ed2
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/97f74ed2
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/97f74ed2
Branch: refs/heads/GROOVY_2_4_X
Commit: 97f74ed20f34469d2c08e54a208dc18784b0ccdd
Parents: 776ea2c
Author: Karsten Tinnefeld <k....@gmail.com>
Authored: Fri Sep 9 00:49:06 2016 +0200
Committer: John Wagenleitner <jw...@apache.org>
Committed: Thu Sep 8 17:38:59 2016 -0700
----------------------------------------------------------------------
src/spec/doc/working-with-collections.adoc | 5 +++++
src/spec/test/gdk/WorkingWithCollectionsTest.groovy | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/97f74ed2/src/spec/doc/working-with-collections.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/working-with-collections.adoc b/src/spec/doc/working-with-collections.adoc
index 9fb2d14..859a535 100644
--- a/src/spec/doc/working-with-collections.adoc
+++ b/src/spec/doc/working-with-collections.adoc
@@ -431,6 +431,11 @@ include::{projectdir}/src/spec/test/gdk/WorkingWithCollectionsTest.groovy[tags=s
It is worth noting that negative indices are allowed, to extract more easily from the end of a collection:
+[source,groovy]
+---------------------------------
+include::{projectdir}/src/spec/test/gdk/WorkingWithCollectionsTest.groovy[tags=subscript_3,indent=0]
+---------------------------------
+
You can use negative indices to count from the end of the List, array,
String etc.
http://git-wip-us.apache.org/repos/asf/groovy/blob/97f74ed2/src/spec/test/gdk/WorkingWithCollectionsTest.groovy
----------------------------------------------------------------------
diff --git a/src/spec/test/gdk/WorkingWithCollectionsTest.groovy b/src/spec/test/gdk/WorkingWithCollectionsTest.groovy
index 5d22dd8..3b432d3 100644
--- a/src/spec/test/gdk/WorkingWithCollectionsTest.groovy
+++ b/src/spec/test/gdk/WorkingWithCollectionsTest.groovy
@@ -443,7 +443,7 @@ class WorkingWithCollectionsTest extends GroovyTestCase {
void testMapPropertyNotation() {
// tag::map_property[]
def map = [name: 'Gromit', likes: 'cheese', id: 1234]
- assert map.name == 'Gromit' // can be used instead of map.get('Gromit')
+ assert map.name == 'Gromit' // can be used instead of map.get('name')
assert map.id == 1234
def emptyMap = [:]
@@ -721,10 +721,12 @@ class WorkingWithCollectionsTest extends GroovyTestCase {
text = "nice cheese gromit!"
x = text[-1]
assert x == "!"
+ // end::subscript_4[]
+ // tag::subscript_4a[]
def name = text[-7..-2]
assert name == "gromit"
- // end::subscript_4[]
+ // end::subscript_4a[]
// tag::subscript_5[]
text = "nice cheese gromit!"