diff --git a/include/mruby.h b/include/mruby.h
index aadd56e94..7e2d2575f 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -358,7 +358,7 @@ mrb_value mrb_top_self(mrb_state *);
mrb_value mrb_run(mrb_state*, struct RProc*, mrb_value);
mrb_value mrb_p(mrb_state*, mrb_value);
-int mrb_obj_id(mrb_value obj);
+mrb_int mrb_obj_id(mrb_value obj);
mrb_sym mrb_to_id(mrb_state *mrb, mrb_value name);
int mrb_obj_equal(mrb_state*, mrb_value, mrb_value);
diff --git a/src/etc.c b/src/etc.c
index ac1f79f2f..36da0c943 100644
--- a/src/etc.c
+++ b/src/etc.c
@@ -126,34 +126,7 @@ mrb_block_proc(void)
return mrb_nil_value();//proc_new(mrb_cProc, FALSE);
}
-/*
- * Document-method: __id__
- * Document-method: object_id
- *
- * call-seq:
- * obj.__id__ -> fixnum
- * obj.object_id -> fixnum
- *
- * Returns an integer identifier for obj. The same number will
- * be returned on all calls to id for a given object, and
- * no two active objects will share an id.
- * Object#object_id is a different concept from the
- * :name notation, which returns the symbol id of
- * name. Replaces the deprecated Object#id.
- */
-
-/*
- * call-seq:
- * obj.hash -> fixnum
- *
- * Generates a Fixnum hash value for this object. This
- * function must have the property that a.eql?(b) implies
- * a.hash == b.hash. The hash value is used by class
- * Hash. Any hash value that exceeds the capacity of a
- * Fixnum will be truncated before being used.
- */
-
-int
+mrb_int
mrb_obj_id(mrb_value obj)
{
/*
diff --git a/src/kernel.c b/src/kernel.c
index 605b84124..d230305da 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -207,14 +207,19 @@ mrb_equal_m(mrb_state *mrb, mrb_value self)
/* 15.3.1.3.3 */
/* 15.3.1.3.33 */
/*
- * call-seq:
- * obj.hash -> fixnum
+ * Document-method: __id__
+ * Document-method: object_id
*
- * Generates a Fixnum hash value for this object. This
- * function must have the property that a.eql?(b) implies
- * a.hash == b.hash. The hash value is used by class
- * Hash. Any hash value that exceeds the capacity of a
- * Fixnum will be truncated before being used.
+ * call-seq:
+ * obj.__id__ -> fixnum
+ * obj.object_id -> fixnum
+ *
+ * Returns an integer identifier for obj. The same number will
+ * be returned on all calls to id for a given object, and
+ * no two active objects will share an id.
+ * Object#object_id is a different concept from the
+ * :name notation, which returns the symbol id of
+ * name. Replaces the deprecated Object#id.
*/
static mrb_value
mrb_obj_id_m(mrb_state *mrb, mrb_value self)
@@ -526,6 +531,16 @@ mrb_obj_extend_m(mrb_state *mrb, mrb_value self)
//mrb_f_global_variables(mrb_state *mrb, mrb_value self)
/* 15.3.1.3.15 */
+/*
+ * call-seq:
+ * obj.hash -> fixnum
+ *
+ * Generates a Fixnum hash value for this object. This
+ * function must have the property that a.eql?(b) implies
+ * a.hash == b.hash. The hash value is used by class
+ * Hash. Any hash value that exceeds the capacity of a
+ * Fixnum will be truncated before being used.
+ */
mrb_value
mrb_obj_hash(mrb_state *mrb, mrb_value self)
{