hessian 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/hessian.rb +8 -2
- data/test/test_hessian_parser.rb +2 -2
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/hessian.rb
CHANGED
@@ -144,12 +144,18 @@ module Hessian
|
|
144
144
|
# Skip the list length if specified.
|
145
145
|
@data.slice!(0, 5) if @data[0,1] == 'l'
|
146
146
|
@refs << (list = [])
|
147
|
-
list << parse_object while @data[0,1] != 'z'
|
147
|
+
list << parse_object while @data[0,1] != 'z'
|
148
|
+
# Get rid of the 'z'.
|
149
|
+
@data.slice!(0, 1)
|
150
|
+
list
|
148
151
|
when 'M'
|
149
152
|
# Skip type + type length (2 bytes) if specified.
|
150
153
|
@data.slice!(0, 3 + @data.unpack('an')[1]) if @data[0,1] == 't'
|
151
154
|
@refs << (map = {})
|
152
|
-
map[parse_object()] = parse_object while @data[0,1] != 'z'
|
155
|
+
map[parse_object()] = parse_object while @data[0,1] != 'z'
|
156
|
+
# Get rid of the 'z'.
|
157
|
+
@data.slice!(0, 1)
|
158
|
+
map
|
153
159
|
else
|
154
160
|
raise "Invalid type: '#{t}'"
|
155
161
|
end
|
data/test/test_hessian_parser.rb
CHANGED
@@ -46,9 +46,9 @@ class HessianParserTest < Test::Unit::TestCase
|
|
46
46
|
"I\000\000\000\003zzz" ].join)
|
47
47
|
end
|
48
48
|
def test_map
|
49
|
-
map = { 'numbers' => [ 1.1, 1.2, 1.3 ] }
|
49
|
+
map = { 'sillen' => 32, 'numbers' => [ 1.1, 1.2, 1.3 ] }
|
50
50
|
assert_equal map, parse([ "r\001\000Mt\000\000S\000\anumbersVt\000\a[double",
|
51
51
|
"l\000\000\000\003D?\361\231\231\231\231\231\232D?\363333333D?",
|
52
52
|
"\364\314\314\314\314\314\315zS\000\006sillenI\000\000\000 zz" ].join)
|
53
53
|
end
|
54
|
-
end
|
54
|
+
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: hessian
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2006-
|
6
|
+
version: 0.5.3
|
7
|
+
date: 2006-04-10 00:00:00 +02:00
|
8
8
|
summary: A Ruby Hessian client.
|
9
9
|
require_paths:
|
10
10
|
- lib
|