On Sat, Oct 29, 2005 at 01:22:34PM +0900,
[hidden email] wrote:
> Hi everyone
>
> Here is a test with groovysh of Groovy 1.0-jsr-01.
> X--------------------------------------------------
> Lets get Groovy!
> ================
> Version: 1.0-jsr-01 JVM: 1.4.2_08-b03
> Type 'exit' to terminate the shell
> Type 'help' for command help
> Type 'go' to execute the statements
>
> groovy> def fn() {
> groovy> println 100
> groovy> }
> groovy> fn()
> groovy> go
> 100
> X-----------------------------------------------------
>
> And here is a test with groovysh of Groovy 1.0-jsr-04-SNAPSHOT (CVS HEAD).
> X---------------------------------------------------
> Lets get Groovy!
> ================
> Version: 1.0-jsr-04-SNAPSHOT JVM: 1.4.2_08-b03
> Type 'exit' to terminate the shell
> Type 'help' for command help
> Type 'go' to execute the statements
>
> groovy> def fn() {
> Discarding invalid text:
> groovysh script: 2: expecting '}', found 'null' @ line 2, column 1.
> 1 Error
> X-----------------------------------------------------
>
> As above, the CVS Head does not support muliti-line codes with groovysh.
> Is this a feature or a bug?
>
>
> Kim
>
It is already issued at
http://jira.codehaus.org/browse/GROOVY-1021If it is a bug, may I fix the issue?
Here is a test after fixing at local.
X-----------------------------------------------
Lets get Groovy!
================
Version: 1.0-jsr-04-SNAPSHOT JVM: 1.4.2_08-b03
Type 'exit' to terminate the shell
Type 'help' for command help
Type 'go' to execute the statements
groovy> for (i in 1..10) {
groovy> println i
groovy> }
groovy> go
1
2
3
4
5
6
7
8
9
10
X---------------------------------------------------
Kim