This method is a shortcut for converting a single row (Array
) into a CSV
String
.
The options
parameter can be anything CSV::new()
understands. This method understands an additional :encoding
parameter to set the base Encoding
for the output. This method will try to guess your Encoding
from the first non-nil
field in row
, if possible, but you may need to use this parameter as a backup plan.
The :row_sep
option
defaults to $INPUT_RECORD_SEPARATOR
($/
) when calling this method.
This method is a shortcut for converting a single line of a CSV
String
into an Array
. Note that if line
contains multiple rows, anything beyond the first row is ignored.
The options
parameter can be anything CSV::new()
understands.
The regex marking a line as a comment. See CSV::new
for details.
Returns true
if headers are written in output. See CSV::new
for details.
Returns the list of break points where execution will be stopped.
See DEBUGGER__
for more usage
Returns true if the ipaddr is a link-local address. IPv4 addresses in 169.254.0.0/16 reserved by RFC 3927 and Link-Local IPv6 Unicast Addresses in fe80::/10 reserved by RFC 4291 are considered link-local.
Returns a string for DNS reverse lookup compatible with RFC1886.
Creates a Range
object for the network address.
Returns the names of the binding’s local variables as symbols.
def foo a = 1 2.times do |n| binding.local_variables #=> [:a, :n] end end
This method is the short version of the following code:
binding.eval("local_variables")
Returns range or nil
Called for dup & clone.
Private. Use Matrix#determinant
Returns the determinant of the matrix, using Bareiss’ multistep integer-preserving gaussian elimination. It has the same computational cost order O(n^3) as standard Gaussian elimination. Intermediate results are fraction free and of lower complexity. A matrix of Integers will have thus intermediate results that are also Integers, with smaller bignums (if any), while a matrix of Float
will usually have intermediate results with better precision.
Called for dup & clone.
Returns the inner product of this vector with the other.
Vector[4,7].inner_product Vector[10,1] => 47
Returns an angle with another vector. Result is within the [0..Math::PI].
Vector[1,0].angle_with(Vector[0,1]) # => Math::PI / 2