A better Marshal.load for RPG Maker XP
Wed, 03 Oct 2007 08:14:21 +0000 - Author: Peter O.
This overload of Marshal.load allows you to read files from your RPG Maker XP project, even in encrypted archives. Just use load_data to do so. If the file isn't a serialized Ruby object, then Marshal.load will consider it a string and return that instead.
module Marshal
class << self
alias oldload load
def load(port,*arg)
begin
return oldload(port,*arg)
rescue
if port.is_a?(IO)
return port.read
else
return port
end
end
end
end
end