⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Kernel
/
View File Name :
Integer-i.ri
U:RDoc::AnyMethod[iI"Integer:ETI"Kernel#Integer;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"(Converts
arg
to an Integer. ;TI"GNumeric types are converted directly (with floating point numbers ;TI"Kbeing truncated).
base
(0, or between 2 and 36) is a base for ;TI"@integer string representation. If
arg
is a String, ;TI"Bwhen
base
is omitted or equals zero, radix indicators ;TI"I(
0
,
0b
, and
0x
) are honored. ;TI"LIn any case, strings should consist only of one or more digits, except ;TI"Nfor that a sign, one underscore between two digits, and leading/trailing ;TI"Cspaces are optional. This behavior is different from that of ;TI"@String#to_i. Non string values will be converted by first ;TI"8trying
to_int
, then
to_i
.;To:RDoc::Markup::BlankLine o; ; [ I"NPassing
nil
raises a TypeError, while passing a String that ;TI"Kdoes not conform with numeric representation raises an ArgumentError. ;TI"LThis behavior can be altered by passing
exception: false
, ;TI"Gin this case a not convertible value will return
nil
.;T@o:RDoc::Markup::Verbatim; [I"!Integer(123.999) #=> 123 ;TI" Integer("0x1a") #=> 26 ;TI"(Integer(Time.new) #=> 1204973019 ;TI"!Integer("0930", 10) #=> 930 ;TI"Integer("111", 2) #=> 7 ;TI" Integer(" +1_0 ") #=> 10 ;TI"GInteger(nil) #=> TypeError: can't convert nil into Integer ;TI"MInteger("x") #=> ArgumentError: invalid value for Integer(): "x" ;TI" ;TI"2Integer("x", exception: false) #=> nil;T:@format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"@Integer(arg, base=0, exception: true) -> integer or nil ;T0[ I"(*args);T@+FI"Kernel;TcRDoc::NormalModule00