Sha256: 9baadf2963986480b1524f5f6524f65d564c7d07b2528fa01f5fc4c47b065eb8

Contents?: true

Size: 496 Bytes

Versions: 20

Compression:

Stored size: 496 Bytes

Contents

require 'corelib/marshal/read_buffer'
require 'corelib/marshal/write_buffer'

module Marshal
  MAJOR_VERSION = 4
  MINOR_VERSION = 8

  # For simulating binary strings
  #
  class BinaryString < String
    def encoding
      Encoding::BINARY
    end

    def +(other)
      BinaryString.new(super)
    end
  end

  class << self
  def dump(object)
      WriteBuffer.new(object).write
    end

    def load(marshaled)
      ReadBuffer.new(marshaled).read
    end

    alias restore load
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
opal-0.11.4 opal/corelib/marshal.rb
opal-0.11.3 opal/corelib/marshal.rb
opal-0.11.2 opal/corelib/marshal.rb
opal-0.11.1 opal/corelib/marshal.rb
opal-0.11.1.pre opal/corelib/marshal.rb
opal-0.10.6 opal/corelib/marshal.rb
opal-0.10.6.beta opal/corelib/marshal.rb
opal-0.11.0 opal/corelib/marshal.rb
opal-0.10.5 opal/corelib/marshal.rb
opal-0.10.4 opal/corelib/marshal.rb
opal-0.11.0.rc1 opal/corelib/marshal.rb
opal-0.10.3 opal/corelib/marshal.rb
opal-0.10.2 opal/corelib/marshal.rb
opal-0.10.1 opal/corelib/marshal.rb
opal-0.10.0 opal/corelib/marshal.rb
opal-0.10.0.rc2 opal/corelib/marshal.rb
opal-0.10.0.rc1 opal/corelib/marshal.rb
opal-0.10.0.beta5 opal/corelib/marshal.rb
opal-0.10.0.beta4 opal/corelib/marshal.rb
opal-0.10.0.beta3 opal/corelib/marshal.rb