diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-05 22:56:51 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-05 22:56:51 +0900 |
| commit | ff42f8f4854525bfecb1a76252730aaad137080f (patch) | |
| tree | da80627552114e96b03c5fa991f3534e62fc9ca8 /src/kernel.c | |
| parent | fbfef55152364b71df9eef8187fce94a5054ee5b (diff) | |
| download | mruby-ff42f8f4854525bfecb1a76252730aaad137080f.tar.gz mruby-ff42f8f4854525bfecb1a76252730aaad137080f.zip | |
move RDoc comments
Diffstat (limited to 'src/kernel.c')
| -rw-r--r-- | src/kernel.c | 27 |
1 files changed, 21 insertions, 6 deletions
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 */ /* + * Document-method: __id__ + * Document-method: object_id + * * call-seq: - * obj.hash -> fixnum + * obj.__id__ -> fixnum + * obj.object_id -> fixnum * - * Generates a <code>Fixnum</code> hash value for this object. This - * function must have the property that <code>a.eql?(b)</code> implies - * <code>a.hash == b.hash</code>. The hash value is used by class - * <code>Hash</code>. Any hash value that exceeds the capacity of a - * <code>Fixnum</code> will be truncated before being used. + * Returns an integer identifier for <i>obj</i>. The same number will + * be returned on all calls to <code>id</code> for a given object, and + * no two active objects will share an id. + * <code>Object#object_id</code> is a different concept from the + * <code>:name</code> notation, which returns the symbol id of + * <code>name</code>. Replaces the deprecated <code>Object#id</code>. */ 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 <code>Fixnum</code> hash value for this object. This + * function must have the property that <code>a.eql?(b)</code> implies + * <code>a.hash == b.hash</code>. The hash value is used by class + * <code>Hash</code>. Any hash value that exceeds the capacity of a + * <code>Fixnum</code> will be truncated before being used. + */ mrb_value mrb_obj_hash(mrb_state *mrb, mrb_value self) { |
