Get the entity expansion limit. By default the limit is set to 10240.
Replaces the contents of self
with the contents of other_ary
, truncating or expanding if necessary.
a = [ "a", "b", "c", "d", "e" ] a.replace([ "x", "y", "z" ]) #=> ["x", "y", "z"] a #=> ["x", "y", "z"]
Numerics are immutable values, which should not be copied.
Any attempt to use this method on a Numeric
will raise a TypeError
.
Replaces the contents and taintedness of str with the corresponding values in other_str.
s = "hello" #=> "hello" s.replace "world" #=> "world"
Returns true if str
starts with one of the prefixes
given.
"hello".start_with?("hell") #=> true # returns true if one of the prefixes matches. "hello".start_with?("heaven", "hell") #=> true "hello".start_with?("heaven", "paradise") #=> false
Returns whether ASCII-compatible or not.
Encoding::UTF_8.ascii_compatible? #=> true Encoding::UTF_16BE.ascii_compatible? #=> false
Duplicates a StringScanner
object.
Stores the indicated separators for later use.
If auto-discovery was requested for @row_sep
, this method will read ahead in the @io
and try to find one. ARGF
, STDIN
, STDOUT
, STDERR
and any stream open for output only with a default @row_sep
of $INPUT_RECORD_SEPARATOR
($/
).
This method also establishes the quoting rules used for CSV
output.
Pre-compiles parsers and stores them by name for access during reads.
Loads any converters requested during construction.
If field_name
is set :converters
(the default) field converters are set. When field_name
is :header_converters
header converters are added instead.
The :unconverted_fields
option is also activated for :converters
calls, if requested.
Returns the Laplace expansion along given row or column.
Matrix[[7,6], [3,9]].laplace_expansion(column: 1) => 45 Matrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) => Vector[3, -2]
Dup internal hash.
The version of the Marshal
format for your Ruby.
How String Gem paths should be split. Overridable for esoteric platforms.
Get a single optional argument from the command line. If more than one argument is given, return only the first. Return nil if none are given.