Module: Marshal
- Defined in:
- lib/second_level_cache/marshal.rb
Class Method Summary collapse
Class Method Details
.load_with_constantize(value) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/second_level_cache/marshal.rb', line 4 def load_with_constantize(value) begin Marshal.load_without_constantize value rescue ArgumentError => e _, class_name = *(/undefined class\/module (\w+)/.match(e.)) raise if !class_name class_name.constantize Marshal.load value end end |