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.
Andrew P. (Guest)
on 2008-10-30 09: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.
Tomas M. (Guest)
on 2008-10-30 09:16
(Received via mailing list)
This should work:

tag Action.new { puts 'foo' }

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