jstp 1.3.5 → 1.3.6

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.
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module JSTP
3
- VERSION = "1.3.5"
3
+ VERSION = "1.3.6"
4
4
  end
@@ -85,7 +85,11 @@ module Writer
85
85
  response += "\n"
86
86
  if @source.body.is_a? Hash
87
87
  @source.body.each do |key, value|
88
- response += "#{key}: #{JSON.dump(value)}\n"
88
+ begin
89
+ response += "#{key}: #{JSON.dump(value)}\n"
90
+ rescue JSON::GeneratorError => e
91
+ response += "#{key}: #{value}\n"
92
+ end
89
93
  end
90
94
  else
91
95
  response += JSON.dump @source.body
@@ -103,4 +107,4 @@ module Writer
103
107
  end
104
108
  end
105
109
  end
106
- end
110
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jstp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-03-25 00:00:00.000000000 Z
14
+ date: 2013-04-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: em-websocket