Forum: IronRuby Error when running Cucumber examples with IronRuby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
44475aa09882f19e7c2e877700fe7144?d=identicon&s=25 Chamini Gallage (chamini)
on 2009-03-31 12:21
Hi,

I have been putting all my might to get the simple examples working with
IronRuby and Cucumber. I followed ironruby-and-net guidlines in the
following link.
 http://wiki.github.com/aslakhellesoy/cucumber/iron...

All the steps were successful up to the point of running the cucumber
examples.

when I run "icucumber features" after cd to the i18n\en I get the
follwing error.

(eval):220:in `_nt_keyword_space': unexpected break (LocalJumpError)
        from
c:\ironruby_source\ironruby\src\IronRuby.Libraries\Builtins\kernelops.cs:432:in
`loop'
        from (eval):211:in `_nt_keyword_space'
        from feature.rb:900:in `_nt_step'
        from feature.rb:848:in `_nt_steps'
        from
c:\ironruby_source\ironruby\src\IronRuby.Libraries\Builtins\kernelops.cs:432:in
`loop'
        from feature.rb:839:in `_nt_steps'
        from feature.rb:763:in `_nt_scenario_outline'
        from feature.rb:96:in `_nt_feature'
        from
c:\ironruby_source\ironruby\src\IronRuby.Libraries\Builtins\kernelops.cs:432:in
`loop'
        from feature.rb:71:in `_nt_feature'
        from
c:\ironruby_source\ironruby\src\IronRuby.Libraries\Builtins\kernelops.cs:1259:in
`send'
        from compiled_parser.rb:15:in `parse'
        from treetop_ext.rb:39:in `parse_or_fail'
        from treetop_ext.rb:28:in `parse_file'
        from treetop_ext.rb:19:in `parse_file'
        from main.rb:54:in `load_plain_text_features'
        from
c:\ironruby_source\ironruby\src\IronRuby.Libraries\Extensions\IListOps.cs:700:in
`each'
        from main.rb:49:in `load_plain_text_features'
        from main.rb:30:in `execute!'
        from main.rb:19:in `execute'
        from :0
        from
c:\ironruby_source\ironruby\src\IronRuby.Libraries\Builtins\kernelops.cs:390:in
`load'
        from :0

Thank u very much if somebody can help me on this :)

Cheers!!!
Aea6cfe04952626ab630bde47ff82f89?d=identicon&s=25 Shri Borde (Guest)
on 2009-04-01 00:40
(Received via mailing list)
src\IronRuby.Libraries is no longer a valid path in the sources. You
must have the old sources. We have moved from SVN to GIT. See
http://wiki.github.com/ironruby/ironruby for the latest instructions.

Jimmy, were you going to delete the SVN sources and put a pointer to the
GIT repo? This is the second instance someone has used the old sources,
so we should go ahead and nuke the SVN sources.

Chamini, do keep us updated on how things go with the latest sources.
E1deaac6561498a0e7472e6268ea9ccc?d=identicon&s=25 Jimmy Schementi (Guest)
on 2009-04-01 06:12
(Received via mailing list)
The svn sources have been nuked from /trunk. I left the /tags directory
just in case anyone needs the sources to a previous build that isn't in
git. /trunk now only have one file in it ... a README that directs
people to github: http://ironruby.rubyforge.org/svn/trunk.
________________________________________
From: ironruby-core-bounces@rubyforge.org
[ironruby-core-bounces@rubyforge.org] on behalf of Shri Borde
[Shri.Borde@microsoft.com]
Sent: Tuesday, March 31, 2009 2:19 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Error when running Cucumber examples with
IronRuby

src\IronRuby.Libraries is no longer a valid path in the sources. You
must have the old sources. We have moved from SVN to GIT. See
http://wiki.github.com/ironruby/ironruby for the latest instructions.

Jimmy, were you going to delete the SVN sources and put a pointer to the
GIT repo? This is the second instance someone has used the old sources,
so we should go ahead and nuke the SVN sources.

Chamini, do keep us updated on how things go with the latest sources.
44475aa09882f19e7c2e877700fe7144?d=identicon&s=25 Chamini Gallage (chamini)
on 2009-04-01 07:59
Hi,

Thank you very much for the kind support. Now, I'm going ahead with the
new source :). I will be happy to update u as soon as possible :D.
44475aa09882f19e7c2e877700fe7144?d=identicon&s=25 Chamini Gallage (chamini)
on 2009-04-02 05:12
Hi,

I got the new ironruby source from
http://github.com/ironruby/ironruby/tree/master and built it by Visual
Studio 2008 (with 11 successful, 0 failed and 1 skipped)and tried the
examples. Still I'm getting a simillar kind of error.

C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.2.3\examples\i18n\en>icucumber
features
*** THIS RUBY IMPLEMENTATION DOESN'T REPORT FILE AND LINE FOR PROCS ***
*** WARNING: You must "gem install win32console" (1.2.0 or higher) to
get coloured output on MRI/Windows
(eval):220:in `_nt_keyword_space': unexpected break (LocalJumpError)
        from :0:in `loop'
        from (eval):211:in `_nt_keyword_space'
        from feature.rb:900:in `_nt_step'
        from feature.rb:848:in `_nt_steps'
        from :0:in `loop'
        from feature.rb:839:in `_nt_steps'
        from feature.rb:763:in `_nt_scenario_outline'
        from feature.rb:96:in `_nt_feature'
        from :0:in `loop'
        from feature.rb:71:in `_nt_feature'
        from :0:in `send'
        from compiled_parser.rb:15:in `parse'
        from treetop_ext.rb:39:in `parse_or_fail'
        from treetop_ext.rb:28:in `parse_file'
        from
c:\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:161:in
`InvokeOpenBlock'
        from treetop_ext.rb:19:in `parse_file'
        from main.rb:54:in `load_plain_text_features'
        from :0:in `each'
        from main.rb:49:in `load_plain_text_features'
        from main.rb:30:in `execute!'
        from main.rb:19:in `execute'
        from cucumber:0
        from :0:in `load'
        from cucumber:0

I tried the same procedure after rake compiling the source as well, but
got the same error.

Ruby, IronRuby and Cucumber seems to be working fine when tested alone.
Any help will be very much appreciated.

Thanx in advance :)
Aea6cfe04952626ab630bde47ff82f89?d=identicon&s=25 Shri Borde (Guest)
on 2009-04-02 07:43
(Received via mailing list)
Its an IronRuby bug with "break" in eval'ed code. The problem can be
reproed with the snippet below. Tomas, do you want to take a look?

def f
 yield
end

f { break } # This works with both MRI and IronRuby

eval "f { break }" # This throws LocalJumpError with IronRuby only

Thanks,
Shri
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2009-04-02 09:58
(Received via mailing list)
Let's file a bug. We have more control flow issues to be fixed. I'll fix
them all at once.

Thanks for investigation,
Tomas
44475aa09882f19e7c2e877700fe7144?d=identicon&s=25 Chamini Gallage (chamini)
on 2009-04-15 07:28
Hi,

I have been trying the same task with the latest ironruby source and
continuously get the same error. Can some one please guide me how and
where to apply the snippet mentioned in Shri's post;

Shri Borde wrote:
> Its an IronRuby bug with "break" in eval'ed code. The problem can be
> reproed with the snippet below. Tomas, do you want to take a look?
>
> def f
>  yield
> end
>
> f { break } # This works with both MRI and IronRuby
>
> eval "f { break }" # This throws LocalJumpError with IronRuby only
>
> Thanks,
> Shri

Thanks in advance..

Chamini
E1deaac6561498a0e7472e6268ea9ccc?d=identicon&s=25 Jimmy Schementi (Guest)
on 2009-04-15 16:58
(Received via mailing list)
That's because the bug still exist ...
http://ironruby.codeplex.com/WorkItem/View.aspx?Wo...

~js
A3a24e2b50a2707e0dca6b0d83228c26?d=identicon&s=25 Zach Shewmaker (zshewmaker)
on 2009-04-19 23:55
Is there a workaround that we can use in the time being? I found where
the exception was being thrown and tried to figure it out myself, but
the codebase is just too foreign me.

Thanks,
Zach

Jimmy Schementi wrote:
> That's because the bug still exist ...
> http://ironruby.codeplex.com/WorkItem/View.aspx?Wo...
>
> ~js
Aea6cfe04952626ab630bde47ff82f89?d=identicon&s=25 Shri Borde (Guest)
on 2009-04-20 08:58
(Received via mailing list)
Could you modify the cucumber Ruby sources so that it does not use
"break" in evaled code (unless the break is in a loop or a block)? From
the output Chamini had sent before, it looks like "_nt_keyword_space" is
a method defined using eval, and it has the break that is not in a loop
or a block. You could modify the eval code to use some other control
flow instead of a break - like throwing an exception. This will allow
you to find other problems that may be hidden behind this one.
This topic is locked and can not be replied to.