From 3531d2291890f7daebcaad4db734ce8aa201dd60 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Fri, 12 Jul 2024 19:34:46 -0400 Subject: [PATCH] [DOC] Document RbConfig::LIMITS --- template/limits.c.tmpl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 #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 + * require 'rbconfig/sizeof'. + * + * require 'rbconfig/sizeof' + * RUBY_PLATFORM # => "x64-mingw-ucrt" + * RbConfig::LIMITS.fetch_values('FIXNUM_MAX', 'LONG_MAX') + * # => [1073741823, 2147483647] + * + */ + void Init_limits(void) {