summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-02-19 08:25:40 -0800
committerJeremy Evans <code@jeremyevans.net>2021-02-19 08:30:11 -0800
commitb51e5c2370e1579f1f225ea4cfc9e834b7575944 (patch)
tree05673fdd04b4641441cb66d92740cc0084e5d8e7 /time.c
parent87437326214e4587a41946c8937e11418d983acd (diff)
Remove mentions of Bignum in time.c
Move section on internal details out of the class-level documentation, since users do not need to know that. Update it to use Integer(T_BIGNUM) instead of Bignum. Fixes [Misc #17580]
Diffstat (limited to 'time.c')
-rw-r--r--time.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/time.c b/time.c
index bd79110c5e..bfcce8ee0f 100644
--- a/time.c
+++ b/time.c
@@ -5080,7 +5080,7 @@ time_mdump(VALUE time)
* Append extended year distance from 1900..(1900+0xffff). In
* each cases, there is no sign as the value is positive. The
* format is length (marshaled long) + little endian packed
- * binary (like as Fixnum and Bignum).
+ * binary (like as Integer).
*/
size_t ysize = rb_absint_size(year_extend, NULL);
char *p, *const buf_year_extend = buf + base_dump_size;
@@ -5589,6 +5589,16 @@ rb_time_zone_abbreviation(VALUE zone, VALUE time)
return rb_obj_as_string(abbr);
}
+/* Internal Details:
+ *
+ * Since Ruby 1.9.2, Time implementation uses a signed 63 bit integer or
+ * Integer(T_BIGNUM), Rational.
+ * The integer is a number of nanoseconds since the _Epoch_ which can
+ * represent 1823-11-12 to 2116-02-20.
+ * When Integer(T_BIGNUM) or Rational is used (before 1823, after 2116, under
+ * nanosecond), Time works slower than when integer is used.
+ */
+
/*
* Time is an abstraction of dates and times. Time is stored internally as
* the number of seconds with subsecond since the _Epoch_,
@@ -5605,13 +5615,6 @@ rb_time_zone_abbreviation(VALUE zone, VALUE time)
* (Since Ruby 2.7.0, Time#inspect shows subsecond but
* Time#to_s still doesn't show subsecond.)
*
- * Since Ruby 1.9.2, Time implementation uses a signed 63 bit integer,
- * Bignum or Rational.
- * The integer is a number of nanoseconds since the _Epoch_ which can
- * represent 1823-11-12 to 2116-02-20.
- * When Bignum or Rational is used (before 1823, after 2116, under
- * nanosecond), Time works slower as when integer is used.
- *
* = Examples
*
* All of these examples were done using the EST timezone which is GMT-5.