Hi guys,

For a project I want to be able to get access to the block definition
as a string.

After some help I came up with this: http://gist.github.com/279656

This solves the problem. When I run the same code on top of IronRuby,
I get the following error message:

/Users/Ben/Library/ironruby-0.9.3/lib/ironruby/gems/1.8/gems/ParseTree-3.0.4/lib/parse_tree_extensions.rb:52:in
`to_sexp': undefined method `parse_tree_for_proc' for
#<ParseTree:0x0000726 @include_newlines=false> (NoMethodError)
        from 
/Users/Ben/Library/ironruby-0.9.3/lib/ironruby/gems/1.8/gems/ParseTree-3.0.4/lib/parse_tree_extensions.rb:57:in
`to_ruby'
        from mock.rb:31:in `block_as_string'
        from mock.rb:34

Any ideas on this? It's using Ruby2Ruby and ParseTree. Is it because
it's based around C extensions? Anyone know how to do it on the CLR?

Thanks

Ben
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to