Proc that takes a block

this works in native Ruby

def foo
yield Time.now
end
h = proc { |&blk| foo &blk }
h.call { |t| puts t }

In JRuby 1.4.0 and 1.5.0.RC1, I get
unexpected tAMPER
when defining ‘h’

TIA,
Mike


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This works for me in 1.5.0.RC1 and 1.5.0.RC2 (we added the 1.8.7 block
param feature for 1.5.x). Perhaps there is an environment issue where
you are still pulling 1.4 jruby jar?

-Tom

On Wed, Apr 28, 2010 at 1:43 PM, Mike L. [email protected] wrote:

when defining ‘h’


blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs