missing method "to_yaml" in IronRuby
I created my own ruby console using IronRuby engine, but I can't get to_yaml to work on any of my .net classes.
Did I missed anything?
person = Person.new
person.Name = 'John Doe'
person.Age = 26
puts person.to_yaml #does not wor开发者_Go百科k
It looks like YAML isn't included by default at startup. Try running
require 'yaml'
first - it made your code work for me in iirb.
精彩评论