Skip to content

Commit

Permalink
[DOC] Document RbConfig::LIMITS
Browse files Browse the repository at this point in the history
  • Loading branch information
XrXr committed Jul 14, 2024
1 parent a97c2ce commit fac271a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions template/limits.c.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit fac271a

Please sign in to comment.