take-cheeze / mruby-marshal

mruby implementation of cruby marshaling.
12 stars 9 forks source link

Hitting "_load" results in triggering assert #14

Closed Moon4u closed 8 years ago

Moon4u commented 8 years ago

I'm loading classes from files, that are dumped from irb. The classes have _load method. Upon marshal.load I hit the assert in line #L578.

If I remove the assert everything runs correctly.

Example: Example class:

Ruby
class A
    def initialize
        @a = 0
    end

    def self._dump(arg = 0)
        [@a].pack('L')
    end

    def self._load(s)
        @a = s.unpack('L')
    end
end

For pack and unpack I'm using iij/mruby-pack, but I don't think the problem is there.