|
Re: Array.min using a block gives error - `min': yield called out of block : msg#00001lang.jruby.user
If it works in Ruby, it's a bug in JRuby. Go ahead and add it to the bug list and we'll have a looksee. - Charlie On 2/2/06, Hockey, Joel <joel.hockey@xxxxxx> wrote: > Hi, > > I am using JRuby 0.8.2 with code: > > a=['abc','d'] > puts a.min() > puts a.min { |a,b| a.length <=> b.length } > > I expect to get: > abc > d > > Using standard ruby, this works fine, but JRuby gives error: > > test.rb:3:in `min': yield called out of block (LocalJumpError) > from test.rb:3:in `call' > from /home/enebo/release/jruby/src/builtin/Enumerable.rb:157:in > `min' > from test.rb:3:in `each' > from /home/enebo/release/jruby/src/builtin/Enumerable.rb:158:in > `min' > from test.rb:3 > > Has anyone else had a similar problem? > > Should this work, or is this a bug in JRuby? I have seen bug 1048209 > <http://sourceforge.net/tracker/?group_id=35413&atid=413912&func=detail& > aid=1048209> that looks similar. > > I can see the code in ThreadContext:208 that is throwing the exception, > and so I might look into what is causing the problem, but if this is not > meant to work, then I'm obviously wasting my time. I will add this to > the current bug list. > > Joel Hockey > Solution Architect > Hewlett-Packard > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642 > _______________________________________________ > Jruby-user mailing list > Jruby-user@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/jruby-user > -- Charles Oliver Nutter @ headius.blogspot.com JRuby Developer @ jruby.sourceforge.net Application Architect @ www.ventera.com ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Array.min using a block gives error - `min': yield called out of block (LocalJumpError): 00001, Hockey, Joel |
|---|---|
| Next by Date: | RE: using Ruby objects from Java: 00001, Yemi D. Bedu |
| Previous by Thread: | Array.min using a block gives error - `min': yield called out of block (LocalJumpError)i: 00001, Hockey, Joel |
| Next by Thread: | RE: using Ruby objects from Java: 00001, Yemi D. Bedu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |