talk 2.3.4 → 2.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b532daa1713be450af26e856bb9ccc31ecf5bd01
4
- data.tar.gz: d071848f467fb19673f313c595bfbc14ea65166e
3
+ metadata.gz: dd6c53088019afec7a1eaf4af18482e702b4ce64
4
+ data.tar.gz: 6801ac23c0c3b5144ce9871e3a73be2ab1fe7ad4
5
5
  SHA512:
6
- metadata.gz: ac237fdb2c1f12ccd1692bdc2dee2d807005968f572fbda05056e118e3649957bb36d0275aad4d6a62c5d902155794b9ef9456e1c5c36fde1b8ad7dd0e4277ec
7
- data.tar.gz: 3c8d916f3a30999e4b986e0520c9c555132a8f2b170ac8cfb2d37b6b81a3d1ca3803d839f405e4a47cd2efde4b1299874e70cbba1f15f9d5eb402395f33f5a9d
6
+ metadata.gz: cba3b142ddfdfb34d896bd8c238b9a77d2f3243c7761203a46d970a5770f24c68a9b94223a9cfc9474fe3df31f92d054b8735a219f6ce1b4017c17dd31e0d2c5
7
+ data.tar.gz: cc85cc629abc26c1405d5332f53cc54d1e1b013332e897277e10f7281078fde2b3530b9258042a2ed669ffd96f93e2760e53954c61927bcab324c68a3177dd22
@@ -142,6 +142,11 @@ TalkObject.prototype.__validateInteger = function(key, param, unsigned, size)
142
142
  var def = this.__definition[key];
143
143
 
144
144
  // Validate number
145
+ if(typeof(param) == 'string')
146
+ {
147
+ if(param.match(new RegExp("^(0x)?[0-9]+$"))) param = parseInt(param);
148
+ }
149
+
145
150
  if(typeof(param) != 'number')
146
151
  {
147
152
  var errMsg = "Expected " + key + " to be a number";
@@ -226,6 +231,10 @@ TalkObject.prototype.__validateInteger = function(key, param, unsigned, size)
226
231
  TalkObject.prototype.__validateReal = function(key, param)
227
232
  {
228
233
  var def = this.__definition[key];
234
+ if(typeof(param) == 'string')
235
+ {
236
+ if(param.match(new RegExp("^[0-9]+(\.[0-9]+)?$"))) param = parseFloat(param);
237
+ }
229
238
  if(typeof(param) != 'number') return "Expected numeric value for " + key;
230
239
  if(def.minValue !== undefined && def.minValue !== null && param < def.minValue)
231
240
  {
@@ -1,3 +1,3 @@
1
1
  module Talk
2
- VERSION = "2.3.4"
2
+ VERSION = "2.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: talk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Acres