summaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'ruby')
-rw-r--r--ruby/pack.c8
-rw-r--r--ruby/pack.h4
-rw-r--r--ruby/rbinit.c2
-rw-r--r--ruby/test_case.rb7
-rw-r--r--ruby/unpack.c10
-rw-r--r--ruby/unpack.h4
6 files changed, 21 insertions, 14 deletions
diff --git a/ruby/pack.c b/ruby/pack.c
index c399c25..0a3711f 100644
--- a/ruby/pack.c
+++ b/ruby/pack.c
@@ -1,7 +1,7 @@
/*
- * MessagePack packing routine for Ruby
+ * MessagePack for Ruby packing routine
*
- * Copyright (C) 2008 FURUHASHI Sadayuki
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,10 +19,10 @@
#include "msgpack/pack_define.h"
#define msgpack_pack_inline_func(name) \
- static inline void msgpack_pack_##name
+ static inline void msgpack_pack ## name
#define msgpack_pack_inline_func_cint(name) \
- static inline void msgpack_pack_##name
+ static inline void msgpack_pack ## name
#define msgpack_pack_user VALUE
diff --git a/ruby/pack.h b/ruby/pack.h
index c38ac48..c9b08a4 100644
--- a/ruby/pack.h
+++ b/ruby/pack.h
@@ -1,7 +1,7 @@
/*
- * MessagePack packing routine for Ruby
+ * MessagePack for Ruby packing routine
*
- * Copyright (C) 2008 FURUHASHI Sadayuki
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/ruby/rbinit.c b/ruby/rbinit.c
index 7ef92fb..80d1d8c 100644
--- a/ruby/rbinit.c
+++ b/ruby/rbinit.c
@@ -1,7 +1,7 @@
/*
* MessagePack for Ruby
*
- * Copyright (C) 2008 FURUHASHI Sadayuki
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/ruby/test_case.rb b/ruby/test_case.rb
index af6d160..1e2d474 100644
--- a/ruby/test_case.rb
+++ b/ruby/test_case.rb
@@ -75,6 +75,13 @@ class MessagePackTestFormat < Test::Unit::TestCase
check 9, -(1<<63)
end
+ it "double" do
+ check 9, 1.0
+ check 9, 0.1
+ check 9, -0.1
+ check 9, -1.0
+ end
+
it "fixraw" do
check_raw 1, 0
check_raw 1, (1<<5)-1
diff --git a/ruby/unpack.c b/ruby/unpack.c
index 2920240..4650ed1 100644
--- a/ruby/unpack.c
+++ b/ruby/unpack.c
@@ -1,7 +1,7 @@
/*
- * MessagePack unpacking routine for Ruby
+ * MessagePack for Ruby unpacking routine
*
- * Copyright (C) 2008 FURUHASHI Sadayuki
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,13 +26,13 @@ typedef struct {
#define msgpack_unpack_struct(name) \
- struct msgpack_unpacker_##name
+ struct msgpack_unpacker ## name
#define msgpack_unpack_func(ret, name) \
- ret msgpack_unpacker_##name
+ ret msgpack_unpacker ## name
#define msgpack_unpack_callback(name) \
- template_callback_##name
+ template_callback ## name
#define msgpack_unpack_object VALUE
diff --git a/ruby/unpack.h b/ruby/unpack.h
index 0fe01ec..ce2a8de 100644
--- a/ruby/unpack.h
+++ b/ruby/unpack.h
@@ -1,7 +1,7 @@
/*
- * MessagePack unpacking routine for Ruby
+ * MessagePack for Ruby unpacking routine
*
- * Copyright (C) 2008 FURUHASHI Sadayuki
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.