mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-17 12:25:38 +02:00
Get a game running with 1.8 (Used Ao Oni)
This commit is contained in:
parent
5bccdb761f
commit
be9eda93c0
2 changed files with 9 additions and 2 deletions
|
@ -394,7 +394,7 @@ static inline VALUE
|
|||
rb_file_open_str(VALUE filename, const char *mode)
|
||||
{
|
||||
VALUE fileobj = rb_const_get(rb_cObject, rb_intern("File"));
|
||||
return rb_funcall(fileobj, rb_intern("open"), 2, filename, mode);
|
||||
return rb_funcall(fileobj, rb_intern("open"), 2, filename, rb_str_new2(mode));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -133,7 +133,14 @@ kernelLoadDataInt(const char *filename, bool rubyExc)
|
|||
{
|
||||
rb_gc_start();
|
||||
|
||||
#ifndef OLD_RUBY
|
||||
VALUE port = fileIntForPath(filename, rubyExc);
|
||||
#else
|
||||
// the above results in an uninitialized IO,
|
||||
// so let's use Ruby to open the file instead
|
||||
// hopefully a temporary fix
|
||||
VALUE port = rb_file_open_str(rb_str_new2(filename), "rb");
|
||||
#endif
|
||||
|
||||
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue