[Ironruby-core] Passing block to CLS method via Action

Tomas Matousek Tomas.Matousek at microsoft.com
Thu Oct 30 03:15:22 EDT 2008


This should work:

tag Action.new { puts 'foo' }

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Andrew Peters
Sent: Thursday, October 30, 2008 12:00 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Passing block to CLS method via Action

Will this ever be supported?

// c#

public void Tag(Action action)
{
  action();
}

// rb

tag do
  puts 'yay!'
end

Cheers,

Andrew.
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list