<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,6 +16,20 @@ class Datagrammer
         when 's'; scanner.scan_string
         when 'i'; scanner.scan_integer
         when 'f'; scanner.scan_float
+        when 'T'; true
+        when 'F'; false
+        when 'N'; nil
+          # not supported yet:
+        # when 'b'; # blob
+        # when 'S'; # symbol
+        # when 't'; # OSC timetag
+        # when 'h'; # 64-bit integer
+        # when 'd'; # 64-bit &quot;double&quot; float
+        # when 'r'; # 32-bit RGBA color
+        # when 'm'; # four-byte midi message
+        # when 'I'; # infinity
+        # when '['; # beginning of array
+        # when ']'; # end of array
         end
       end
       arguments.unshift(message)
@@ -46,6 +60,9 @@ class Datagrammer
         when String; 's' 
         when Integer; 'i'
         when Float; 'f'
+        when TrueClass; 'T'
+        when FalseClass; 'F'
+        when NilClass; 'N'
         end
       end.join
       pad(str)
@@ -57,6 +74,7 @@ class Datagrammer
         when String; pad(argument)
         when Integer; [argument].pack('N')
         when Float; [argument].pack('g')
+        when TrueClass, FalseClass, NilClass; # no arguments
         end
       end.join
     end</diff>
      <filename>lib/datagrammer/packet.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,11 +26,22 @@ describe Datagrammer::Packet do
       encoded = &quot;tick\n\000\000\000,ii\000\000\000\000\n\000\000\334\n&quot;
       Datagrammer::Packet.decode(encoded).should == [&quot;tick\n&quot;, 10, 56330]
     end
+    
+    it &quot;handles encoded booleans correctly&quot; do
+      encoded = &quot;boolean\000,TF\000&quot;
+      Datagrammer::Packet.decode(encoded).should == [&quot;boolean&quot;, true, false]
+    end
+    
+    it &quot;handles encoded nils correctly&quot; do
+      encoded = &quot;nil\000,N\000\000&quot;
+      Datagrammer::Packet.decode(encoded).should == [&quot;nil&quot;, nil]
+    end
   end
   
   describe &quot;encode&quot; do
     [ [['hello'], &quot;hello\000\000\000,\000\000\000&quot;],
       [['hello','world'], &quot;hello\000\000\000,s\000\000world\000\000\000&quot;],
+      [['hello', true, false, nil], &quot;hello\000\000\000,TFN\000\000\000\000&quot;],
       [['hello', 'world', 1, 2.0], &quot;hello\000\000\000,sif\000\000\000\000world\000\000\000\000\000\000\001@\000\000\000&quot;]
     ].each do |message, expected|
       describe &quot;message: #{message.join(', ')}&quot; do</diff>
      <filename>spec/packet_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1240aaecab6f4321e4c5e6ba1994ba67506c15ac</id>
    </parent>
  </parents>
  <author>
    <name>Matt Lyon</name>
    <email>matt@flowerpowered.com</email>
  </author>
  <url>http://github.com/mattly/datagrammer/commit/ff5d3244e08e44d6129c8769fa81cccdc5ef5239</url>
  <id>ff5d3244e08e44d6129c8769fa81cccdc5ef5239</id>
  <committed-date>2008-11-08T09:52:09-08:00</committed-date>
  <authored-date>2008-11-08T09:52:09-08:00</authored-date>
  <message>packet encodes and decodes booleans and nils</message>
  <tree>5f4fd663eeff87ad75f324704ba458939d1eaccd</tree>
  <committer>
    <name>Matt Lyon</name>
    <email>matt@flowerpowered.com</email>
  </committer>
</commit>
