tnetstring 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == 0.3.4 / 2011-06-22
2
+ * Feature Addition
3
+ * Parse and dump floats as per the de facto spec
4
+ == 0.3.3 / 2011-06-21
5
+ * Documentation
6
+ * Include documentation files in gem
1
7
  == 0.3.2 / 2011-06-21
2
8
  * Bug Fix
3
9
  * Parsing Hashes with null values now works
@@ -22,6 +22,8 @@ module TNetstring
22
22
  value = case payload_type
23
23
  when '#'
24
24
  payload.to_i
25
+ when '^'
26
+ payload.to_f
25
27
  when ','
26
28
  payload
27
29
  when ']'
@@ -145,6 +147,9 @@ module TNetstring
145
147
  if obj.kind_of?(Integer)
146
148
  int_str = obj.to_s
147
149
  "#{int_str.length}:#{int_str}#"
150
+ elsif obj.kind_of?(Float)
151
+ float_str = obj.to_s
152
+ "#{float_str.length}:#{float_str}^"
148
153
  elsif obj.kind_of?(String) || obj.kind_of?(Symbol)
149
154
  "#{obj.length}:#{obj},"
150
155
  elsif obj.is_a?(TrueClass)
@@ -1,5 +1,5 @@
1
1
  module TNetstring # :nodoc:
2
2
  module Version # :nodoc:
3
- STRING = '0.3.3'
3
+ STRING = '0.3.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 3
9
- version: 0.3.3
8
+ - 4
9
+ version: 0.3.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matt Yoho
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-06-21 00:00:00 -04:00
17
+ date: 2011-06-22 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency