Hacking a few things to get yaml parsing working in ruby 2 as well
Fixing YAML implementation to work with jruby and be less hacky