summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2024-07-12 19:34:46 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2024-07-15 21:08:13 -0400
commit3531d2291890f7daebcaad4db734ce8aa201dd60 (patch)
treef155de51d348a8993bed7f92bedfba6a9758257b
parent9bf1049dfb37f18e37faebdc1662275a8bc1e917 (diff)
[DOC] Document RbConfig::LIMITS
-rw-r--r--template/limits.c.tmpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/template/limits.c.tmpl b/template/limits.c.tmpl
index c3c2a47624..d1e5b44592 100644
--- a/template/limits.c.tmpl
+++ b/template/limits.c.tmpl
@@ -51,6 +51,20 @@
# include <float.h>
#endif
+/*
+ * Document-const: LIMITS
+ *
+ * A Hash with the bounds of numeric types available to the \C compiler
+ * used to build Ruby. To access this constant, first run
+ * <code>require 'rbconfig/sizeof'</code>.
+ *
+ * require 'rbconfig/sizeof'
+ * RUBY_PLATFORM # => "x64-mingw-ucrt"
+ * RbConfig::LIMITS.fetch_values('FIXNUM_MAX', 'LONG_MAX')
+ * # => [1073741823, 2147483647]
+ *
+ */
+
void
Init_limits(void)
{