Runtime assertions for Ruby literal.fun
ruby
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(DataStructure): add comments for #marshal_load and #marshal_dump (#322)

Adds some comments to `#marshal_load` and `#marshal_dump` to clarify
their purpose.

authored by

Peter Phillips and committed by
GitHub
35165b8c a29263c2

+2
+2
lib/literal/data_structure.rb
··· 29 29 marshal_dump 30 30 end 31 31 32 + # required method for Marshal compatibility 32 33 def marshal_load(payload) 33 34 _version, attributes, was_frozen = payload 34 35 ··· 39 40 freeze if was_frozen 40 41 end 41 42 43 + # required method for Marshal compatibility 42 44 def marshal_dump 43 45 [1, to_h, frozen?].freeze 44 46 end