--
-$Id: ChangeLog 44 2005-05-25 19:51:25Z tilman $
+$Id: ChangeLog 45 2005-05-25 20:08:35Z tilman $
++
2005-05-25 Tilman Sauerbeck (tilman at code-monkey de)
* lib/eet.rb, test/test_chunk.rb: Chunk.deserialize doesn't
modify its argument any more, instead, the number of bytes
consumed is now returned, too.
+ * lib/eet.rb: Stream.deserialize fails if the given buffer is
+ empty
2005-05-19 Tilman Sauerbeck (tilman at code-monkey de)
* Rakefile: Code cleanup
#--
-# $Id: eet.rb 44 2005-05-25 19:51:25Z tilman $
+# $Id: eet.rb 45 2005-05-25 20:08:35Z tilman $
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
end
def Stream.deserialize(data)
- data = data.to_str.dup
+ if data.to_str.empty?
+ raise(ArgumentError, "buffer is empty")
+ end
+
s = Stream.new
offset = 0