ruby-serial 1.0.2.20130725 → 1.0.3.20130731
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -0
- data/ChangeLog +4 -0
- data/ReleaseInfo +1 -1
- data/lib/ruby-serial/versions/1/deserializer.rb +7 -4
- data/lib/ruby-serial/versions/1/serializer.rb +2 -0
- metadata +2 -2
data/AUTHORS
CHANGED
data/ChangeLog
CHANGED
data/ReleaseInfo
CHANGED
@@ -48,14 +48,15 @@ module RubySerial
|
|
48
48
|
elsif (decoded_obj.is_a?(Hash))
|
49
49
|
# Check for special hashes
|
50
50
|
if (decoded_obj[OBJECT_ID_REFERENCE] == nil)
|
51
|
-
|
51
|
+
case decoded_obj[OBJECT_CLASSNAME_REFERENCE]
|
52
|
+
when CLASS_ID_SYMBOL
|
52
53
|
return decoded_obj[OBJECT_CONTENT_REFERENCE].to_sym
|
53
|
-
|
54
|
+
when CLASS_ID_ENCODING
|
54
55
|
return Encoding::find(decoded_obj[OBJECT_CONTENT_REFERENCE])
|
55
|
-
|
56
|
+
when CLASS_ID_RANGE
|
56
57
|
serialized_first, serialized_last, exclude_end = decoded_obj[OBJECT_CONTENT_REFERENCE]
|
57
58
|
return (exclude_end ? (get_original_rec(serialized_first)...get_original_rec(serialized_last)) : (get_original_rec(serialized_first)..get_original_rec(serialized_last)) )
|
58
|
-
|
59
|
+
when nil
|
59
60
|
# Normal hash
|
60
61
|
hash_obj = ((container_to_fill == nil) ? {} : container_to_fill)
|
61
62
|
decoded_obj.each do |serialized_key, serialized_value|
|
@@ -71,6 +72,8 @@ module RubySerial
|
|
71
72
|
instance_vars[var_name] = get_original_rec(serialized_value)
|
72
73
|
end
|
73
74
|
new_obj.set_instance_vars_from_rubyserial(instance_vars)
|
75
|
+
# If there is an onload callback, call it
|
76
|
+
new_obj.rubyserial_onload if (new_obj.respond_to?(:rubyserial_onload))
|
74
77
|
return new_obj
|
75
78
|
end
|
76
79
|
else
|
@@ -137,6 +137,8 @@ module RubySerial
|
|
137
137
|
}
|
138
138
|
else
|
139
139
|
# Handle other objects
|
140
|
+
# If there is an ondump callback, call it
|
141
|
+
obj.rubyserial_ondump if (obj.respond_to?(:rubyserial_ondump))
|
140
142
|
serialized_instance_vars = {}
|
141
143
|
obj.get_instance_vars_to_rubyserial.each do |var_name, value|
|
142
144
|
serialized_instance_vars[var_name] = get_msgpack_compatible_rec(value)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-serial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3.20130731
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|