groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [2/2] incubator-groovy git commit: Minor changes to grammar/spelling (closes #53)
Date Fri, 03 Jul 2015 21:36:51 GMT
Minor changes to grammar/spelling (closes #53)


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/6453efc3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/6453efc3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/6453efc3

Branch: refs/heads/GROOVY_2_4_X
Commit: 6453efc3876e28f14be18c3e44185a3b4ec0f9b2
Parents: b639db9
Author: Aseem Bansal <aseembansal@live.com>
Authored: Sat Jul 4 00:36:54 2015 +0530
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Fri Jul 3 23:36:31 2015 +0200

----------------------------------------------------------------------
 src/spec/doc/style-guide.adoc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/6453efc3/src/spec/doc/style-guide.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/style-guide.adoc b/src/spec/doc/style-guide.adoc
index f122828..ac19817 100644
--- a/src/spec/doc/style-guide.adoc
+++ b/src/spec/doc/style-guide.adoc
@@ -46,7 +46,7 @@ String toString() { return "a server" }
 String toString() { "a server" }
 ----
 
-But sometimes, this doesn't look to good when you're using a variable, and see it visually
twice on two rows:
+But sometimes, this doesn't look too good when you're using a variable, and see it visually
twice on two rows:
 
 [source,groovy]
 ----
@@ -65,7 +65,7 @@ But often, inside of closure, we omit it more often than not, for example.
So ev
 this is by no means mandatory to not use it if you think it halters the readability of your
code.
 
 A word of caution, however. When using methods which are defined with the `def` keyword instead
of a specific concrete type,
-you may be surprise to see the last expression being returned sometimes. So usually prefer
using a specific return type like void or a type.
+you may be surprised to see the last expression being returned sometimes. So usually prefer
using a specific return type like void or a type.
 In our example above, imagine we forgot to put m2 as last statement to be returned,
 the last expression would be `m2.c = 3`, which would return... `3`, and not the map you expect.
 
@@ -307,7 +307,7 @@ server.name = "Obelix"
 server.cluster = aCluster
 ----
 
-You can use named parameters with the default constructor (first the constructor is called,
then the setters are called in turn):
+You can use named parameters with the default constructor (first the constructor is called,
then the setters are called in turn in the sequence in which they are specified in the map):
 
 [source,groovy]
 ----
@@ -533,7 +533,7 @@ switch (x) {
     case Number:
         result = "number"
         break
-    case { it > 3 }
+    case { it > 3 }:
         result = "number > 3"
         break
     default: result = "default"
@@ -663,7 +663,7 @@ def result = name ?: "Unknown"
 
 == Catch any exception
 
-If you don't really care of the exception which are thrown inside your `try` block,
+If you don't really care about the type of the exception which is thrown inside your `try`
block,
 you can simply catch any of them and simply omit the type of the caught exception.
 So instead of catching the exceptions like in:
 


Mime
View raw message