I am using OpenStructs and ERB for template generation. In this simple
example, ruby 1.8.6 runs this fine:

require "erb"

require "ostruct"

puts ERB.new("<%=foo%>", 0, "%<>").result(OpenStruct.new({ :foo => "bar"
}).send(:binding))

 

However, it generates the following error when I run this in IronRuby
1.1.3.0 on .NET 4.0.30319.269:

(erb):2: undefined method `foo' for main:Object (NoMethodError)

 

Does anyone know how to get this to behave correctly in IronRuby?

 

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

Reply via email to