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: Parse_Ruby.rb · GitHub
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