Skip to content

Commit a1ce08a

Browse files
committed
work around unparser issue 117
1 parent 9c4bc6c commit a1ce08a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

ruby/hyper-operation/spec/hyper-operation/server_op_spec.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,13 @@ class Operation < Hyperstack::ServerOp
311311
step {params.message = 'hello'}
312312
step {params.counter + 1}
313313
def self.serialize_params(hash)
314-
hash['counter'] += 1
314+
# hash['counter'] += 1 # bug in unparser https://github.com/mbj/unparser/issues/117
315+
hash['counter'] = hash['counter'] + 1
315316
hash
316317
end
317318
def self.deserialize_params(hash)
318-
hash['counter'] += 1
319+
# hash['counter'] += 1 # bug in unparser https://github.com/mbj/unparser/issues/117
320+
hash['counter'] = hash['counter'] + 1
319321
hash
320322
end
321323
def self.serialize_response(response)
@@ -325,11 +327,13 @@ def self.deserialize_response(response)
325327
response + 1
326328
end
327329
def self.serialize_dispatch(hash)
328-
hash[:message] += ' serialized'
330+
# hash[:message] += ' serialized' # bug in unparser https://github.com/mbj/unparser/issues/117
331+
hash[:message] = hash[:message] + ' serialized'
329332
hash
330333
end
331334
def self.deserialize_dispatch(hash)
332-
hash[:message] += ' deserialized'
335+
# hash[:message] += ' deserialized' # bug in unparser https://github.com/mbj/unparser/issues/117
336+
hash[:message] = hash[:message] + ' deserialized'
333337
hash
334338
end
335339
end

0 commit comments

Comments
 (0)