Forum: IronRuby Passing block to CLS method via Action

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.
0e5987d3f0456799c5327d5ae47b72e1?d=identicon&s=25 Andrew Peters (Guest)
on 2008-10-30 08:00
(Received via mailing list)
Will this ever be supported?

// c#

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

// rb

tag do
  puts 'yay!'
end

Cheers,

Andrew.
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2008-10-30 08:16
(Received via mailing list)
This should work:

tag Action.new { puts 'foo' }

Tomas
This topic is locked and can not be replied to.