diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 11 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,7 @@ +Wed Oct 15 04:56:27 2014 Zachary Scott <e@zzak.io> + + * gc.c (rb_obj_id): [DOC] Fix typo, clean up sentence, and wrap cols + Wed Oct 15 04:53:30 2014 Zachary Scott <e@zzak.io> * error.c: [DOC] Fix case of type in exception message by @tricknotes @@ -2716,13 +2716,14 @@ id2ref(VALUE obj, VALUE objid) * * Returns an integer identifier for +obj+. * - * The same number will be returned on all calls to +object_id+ for a given object, - * and no two active objects will share an id. + * The same number will be returned on all calls to +object_id+ for a given + * object, and no two active objects will share an id. + * + * Note: that some objects of builtin classes are reused for optimization. + * This is the case for immediate values and frozen string literals. * - * Note that some objects of builtin classes are reused for optimization. - * This is the case for immediate values and frozen string litterals. * Immediate values are not passed by reference but are passed by value: - * +nil+, +true+, +false+, Fixnums, Symbols. Some Floats may be immediates too. + * +nil+, +true+, +false+, Fixnums, Symbols, and some Floats. * * Object.new.object_id == Object.new.object_id # => false * (21 * 2).object_id == (21 * 2).object_id # => true |