Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby32 /
share /
doc /
alt-ruby32-doc /
Delete
Unzip
Name
Size
Permission
Date
Action
images
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
irb
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
pty
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
syntax
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
ChangeLog
3.88
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-0.06_to_0.52
46.51
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-0.50_to_0.60
18.81
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-0.60_to_1.1
129.14
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-1.8.0
728.09
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-1.9.3
2.86
MB
-rw-r--r--
2026-03-27 01:23
ChangeLog-2.0.0
830.16
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-2.1.0
603.56
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-2.2.0
401.16
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-2.3.0
400.93
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-2.4.0
327.98
KB
-rw-r--r--
2026-03-27 01:23
ChangeLog-YARV
144.68
KB
-rw-r--r--
2026-03-27 01:23
README.md
3.45
KB
-rw-r--r--
2026-03-27 01:23
bsearch.rdoc
4.24
KB
-rw-r--r--
2026-03-27 01:23
bug_triaging.rdoc
4.04
KB
-rw-r--r--
2026-03-27 01:23
case_mapping.rdoc
3.16
KB
-rw-r--r--
2026-03-27 01:23
character_selectors.rdoc
3.39
KB
-rw-r--r--
2026-03-27 01:23
command_injection.rdoc
711
B
-rw-r--r--
2026-03-27 01:23
contributing.md
990
B
-rw-r--r--
2026-03-27 01:23
dig_methods.rdoc
2.57
KB
-rw-r--r--
2026-03-27 01:23
dtrace_probes.rdoc
7.42
KB
-rw-r--r--
2026-03-27 01:23
encodings.rdoc
16.19
KB
-rw-r--r--
2026-03-27 01:23
extension.ja.rdoc
73.01
KB
-rw-r--r--
2026-03-27 01:23
extension.rdoc
72.26
KB
-rw-r--r--
2026-03-27 01:23
fiber.md
6.74
KB
-rw-r--r--
2026-03-27 01:23
format_specifications.rdoc
9.9
KB
-rw-r--r--
2026-03-27 01:23
forwardable.rd.ja
2.34
KB
-rw-r--r--
2026-03-27 01:23
globals.rdoc
4.33
KB
-rw-r--r--
2026-03-27 01:23
implicit_conversion.rdoc
5.8
KB
-rw-r--r--
2026-03-27 01:23
keywords.rdoc
4.63
KB
-rw-r--r--
2026-03-27 01:23
maintainers.rdoc
10.94
KB
-rw-r--r--
2026-03-27 01:23
marshal.rdoc
11.51
KB
-rw-r--r--
2026-03-27 01:23
memory_view.md
6.51
KB
-rw-r--r--
2026-03-27 01:23
packed_data.rdoc
18.51
KB
-rw-r--r--
2026-03-27 01:23
ractor.md
26.16
KB
-rw-r--r--
2026-03-27 01:23
regexp.rdoc
31.43
KB
-rw-r--r--
2026-03-27 01:23
ruby-exercise.stp
1.08
KB
-rw-r--r--
2026-04-07 17:32
security.rdoc
5.72
KB
-rw-r--r--
2026-03-27 01:23
signals.rdoc
3.33
KB
-rw-r--r--
2026-03-27 01:23
standard_library.rdoc
5.94
KB
-rw-r--r--
2026-03-27 01:23
strftime_formatting.rdoc
16.38
KB
-rw-r--r--
2026-03-27 01:23
syntax.rdoc
1.21
KB
-rw-r--r--
2026-03-27 01:23
timezones.rdoc
3.58
KB
-rw-r--r--
2026-03-27 01:23
transcode.rdoc
2.02
KB
-rw-r--r--
2026-03-27 01:23
yarvarch.en
106
B
-rw-r--r--
2026-03-27 01:23
yarvarch.ja
16.41
KB
-rw-r--r--
2026-03-27 01:23
Save
Rename
== Implicit Conversions Some Ruby methods accept one or more objects that can be either: * <i>Of a given class</i>, and so accepted as is. * <i>Implicitly convertible to that class</i>, in which case the called method converts the object. For each of the relevant classes, the conversion is done by calling a specific conversion method: * Array: +to_ary+ * Hash: +to_hash+ * Integer: +to_int+ * String: +to_str+ === Array-Convertible Objects An <i>Array-convertible object</i> is an object that: * Has instance method +to_ary+. * The method accepts no arguments. * The method returns an object +obj+ for which <tt>obj.kind_of?(Array)</tt> returns +true+. The Ruby core class that satisfies these requirements is: * Array The examples in this section use method <tt>Array#replace</tt>, which accepts an Array-convertible argument. This class is Array-convertible: class ArrayConvertible def to_ary [:foo, 'bar', 2] end end a = [] a.replace(ArrayConvertible.new) # => [:foo, "bar", 2] This class is not Array-convertible (no +to_ary+ method): class NotArrayConvertible; end a = [] # Raises TypeError (no implicit conversion of NotArrayConvertible into Array) a.replace(NotArrayConvertible.new) This class is not Array-convertible (method +to_ary+ takes arguments): class NotArrayConvertible def to_ary(x) [:foo, 'bar', 2] end end a = [] # Raises ArgumentError (wrong number of arguments (given 0, expected 1)) a.replace(NotArrayConvertible.new) This class is not Array-convertible (method +to_ary+ returns non-Array): class NotArrayConvertible def to_ary :foo end end a = [] # Raises TypeError (can't convert NotArrayConvertible to Array (NotArrayConvertible#to_ary gives Symbol)) a.replace(NotArrayConvertible.new) === Hash-Convertible Objects A <i>Hash-convertible object</i> is an object that: * Has instance method +to_hash+. * The method accepts no arguments. * The method returns an object +obj+ for which <tt>obj.kind_of?(Hash)</tt> returns +true+. The Ruby core class that satisfies these requirements is: * Hash The examples in this section use method <tt>Hash#merge</tt>, which accepts a Hash-convertible argument. This class is Hash-convertible: class HashConvertible def to_hash {foo: 0, bar: 1, baz: 2} end end h = {} h.merge(HashConvertible.new) # => {:foo=>0, :bar=>1, :baz=>2} This class is not Hash-convertible (no +to_hash+ method): class NotHashConvertible; end h = {} # Raises TypeError (no implicit conversion of NotHashConvertible into Hash) h.merge(NotHashConvertible.new) This class is not Hash-convertible (method +to_hash+ takes arguments): class NotHashConvertible def to_hash(x) {foo: 0, bar: 1, baz: 2} end end h = {} # Raises ArgumentError (wrong number of arguments (given 0, expected 1)) h.merge(NotHashConvertible.new) This class is not Hash-convertible (method +to_hash+ returns non-Hash): class NotHashConvertible def to_hash :foo end end h = {} # Raises TypeError (can't convert NotHashConvertible to Hash (ToHashReturnsNonHash#to_hash gives Symbol)) h.merge(NotHashConvertible.new) === Integer-Convertible Objects An <i>Integer-convertible object</i> is an object that: * Has instance method +to_int+. * The method accepts no arguments. * The method returns an object +obj+ for which <tt>obj.kind_of?(Integer)</tt> returns +true+. The Ruby core classes that satisfy these requirements are: * Integer * Float * Complex * Rational The examples in this section use method <tt>Array.new</tt>, which accepts an Integer-convertible argument. This user-defined class is Integer-convertible: class IntegerConvertible def to_int 3 end end a = Array.new(IntegerConvertible.new).size a # => 3 This class is not Integer-convertible (method +to_int+ takes arguments): class NotIntegerConvertible def to_int(x) 3 end end # Raises ArgumentError (wrong number of arguments (given 0, expected 1)) Array.new(NotIntegerConvertible.new) This class is not Integer-convertible (method +to_int+ returns non-Integer): class NotIntegerConvertible def to_int :foo end end # Raises TypeError (can't convert NotIntegerConvertible to Integer (NotIntegerConvertible#to_int gives Symbol)) Array.new(NotIntegerConvertible.new) === String-Convertible Objects A <i>String-convertible object</i> is an object that: * Has instance method +to_str+. * The method accepts no arguments. * The method returns an object +obj+ for which <tt>obj.kind_of?(String)</tt> returns +true+. The Ruby core class that satisfies these requirements is: * String The examples in this section use method <tt>String::new</tt>, which accepts a String-convertible argument. This class is String-convertible: class StringConvertible def to_str 'foo' end end String.new(StringConvertible.new) # => "foo" This class is not String-convertible (no +to_str+ method): class NotStringConvertible; end # Raises TypeError (no implicit conversion of NotStringConvertible into String) String.new(NotStringConvertible.new) This class is not String-convertible (method +to_str+ takes arguments): class NotStringConvertible def to_str(x) 'foo' end end # Raises ArgumentError (wrong number of arguments (given 0, expected 1)) String.new(NotStringConvertible.new) This class is not String-convertible (method +to_str+ returns non-String): class NotStringConvertible def to_str :foo end end # Raises TypeError (can't convert NotStringConvertible to String (NotStringConvertible#to_str gives Symbol)) String.new(NotStringConvertible.new)