summaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'ruby')
-rw-r--r--ruby/pack.c5
-rw-r--r--ruby/rbinit.c8
-rw-r--r--ruby/unpack.c7
3 files changed, 12 insertions, 8 deletions
diff --git a/ruby/pack.c b/ruby/pack.c
index 7f56923..bbeac4a 100644
--- a/ruby/pack.c
+++ b/ruby/pack.c
@@ -59,7 +59,6 @@ static ID s_append;
* nil.to_msgpack(out = '') -> String
*
* Serializes the nil into raw bytes.
- * This calls to_msgpack reflectively for internal elements.
*/
static VALUE MessagePack_NilClass_to_msgpack(int argc, VALUE *argv, VALUE self)
{
@@ -76,7 +75,6 @@ static VALUE MessagePack_NilClass_to_msgpack(int argc, VALUE *argv, VALUE self)
* true.to_msgpack(out = '') -> String
*
* Serializes the true into raw bytes.
- * This calls to_msgpack reflectively for internal elements.
*/
static VALUE MessagePack_TrueClass_to_msgpack(int argc, VALUE *argv, VALUE self)
{
@@ -93,7 +91,6 @@ static VALUE MessagePack_TrueClass_to_msgpack(int argc, VALUE *argv, VALUE self)
* false.to_msgpack(out = '') -> String
*
* Serializes false into raw bytes.
- * This calls to_msgpack reflectively for internal elements.
*/
static VALUE MessagePack_FalseClass_to_msgpack(int argc, VALUE *argv, VALUE self)
{
@@ -110,7 +107,6 @@ static VALUE MessagePack_FalseClass_to_msgpack(int argc, VALUE *argv, VALUE self
* fixnum.to_msgpack(out = '') -> String
*
* Serializes the Fixnum into raw bytes.
- * This calls to_msgpack reflectively for internal elements.
*/
static VALUE MessagePack_Fixnum_to_msgpack(int argc, VALUE *argv, VALUE self)
{
@@ -131,7 +127,6 @@ static VALUE MessagePack_Fixnum_to_msgpack(int argc, VALUE *argv, VALUE self)
* bignum.to_msgpack(out = '') -> String
*
* Serializes the Bignum into raw bytes.
- * This calls to_msgpack reflectively for internal elements.
*/
static VALUE MessagePack_Bignum_to_msgpack(int argc, VALUE *argv, VALUE self)
{
diff --git a/ruby/rbinit.c b/ruby/rbinit.c
index 050abde..4ad6beb 100644
--- a/ruby/rbinit.c
+++ b/ruby/rbinit.c
@@ -27,10 +27,18 @@ static VALUE mMessagePack;
* It enables to exchange structured objects between many languages like JSON.
* But unlike JSON, it is very fast and small.
*
+ * You can install MessagePack with rubygems.
+ *
+ * gem install msgpack
+ *
+ * Simple usage is as follows.
+ *
* require 'msgpack'
* msg = [1,2,3].to_msgpack #=> "\x93\x01\x02\x03"
* MessagePack.unpack(msg) #=> [1,2,3]
*
+ * Use Unpacker class for streaming deserialization.
+ *
*/
void Init_msgpack(void)
{
diff --git a/ruby/unpack.c b/ruby/unpack.c
index 9a2c457..dec40c6 100644
--- a/ruby/unpack.c
+++ b/ruby/unpack.c
@@ -654,7 +654,7 @@ void Init_msgpack_unpack(VALUE mMessagePack)
* Following code uses Buffered API with an input stream:
*
* # create an unpacker with input stream.
- * pac = MessagePack::Unpacker.new(stdin)
+ * pac = MessagePack::Unpacker.new(STDIN)
*
* # deserialize object one after another.
* pac.each {|obj|
@@ -663,8 +663,8 @@ void Init_msgpack_unpack(VALUE mMessagePack)
*
*
* Following code doesn't use the input stream and feeds buffer
- * using *fill* method. This is useful to use special stream
- * or with event-driven I/O library.
+ * manually. This is useful to use special stream or with
+ * event-driven I/O library.
*
* # create an unpacker without input stream.
* pac = MessagePack::Unpacker.new()
@@ -677,6 +677,7 @@ void Init_msgpack_unpack(VALUE mMessagePack)
* # ...
* }
*
+ *
* You can manage the buffer manually with the combination of
* *execute*, *finished?*, *data* and *reset* method.
*