Marshal tweaks

This commit is contained in:
Mathew Velasquez 2016-12-08 20:20:12 -05:00
parent a0ba40916d
commit 99d0c2888a

View file

@ -129,7 +129,7 @@ kernelLoadDataInt(const char *filename, bool rubyExc)
VALUE port = fileIntForPath(filename, rubyExc);
VALUE marsh = rb_const_get(rb_cObject, rb_intern("PureRubyMarshal"));
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
// FIXME need to catch exceptions here with begin rescue
VALUE result = rb_funcall2(marsh, rb_intern("load"), 1, &port);
@ -223,7 +223,7 @@ fileIntBindingInit()
/* We overload the built-in 'Marshal::load()' function to silently
* insert our utf8proc that ensures all read strings will be
* UTF-8 encoded */
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
rb_define_alias(rb_singleton_class(marsh), "_mkxp_load_alias", "load");
_rb_define_module_function(marsh, "load", _marshalLoad);
// VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
// rb_define_alias(rb_singleton_class(marsh), "_mkxp_load_alias", "load");
// _rb_define_module_function(marsh, "load", _marshalLoad);
}