Executes the generated ERB code to produce a completed template, returning the results of that code. (See ERB::new for details on how this process can be affected by safe_level.)
b accepts a Binding object which is used to set the context of code evaluation.
Returns true if this is a regular (i.e. non-singular) matrix.
Returns true if this is a singular matrix.
Creates a vector from an Array. The optional second argument specifies whether the array itself or a copy is used internally.
Release code
Removes the last List.
Completes shortened long style option switch and returns pair of canonical switch and switch descriptor OptionParser::Switch.
typSearching table.
optSearching key.
icaseSearch case insensitive if true.
patOptional pattern for completion.
Returns the number of elements in the match array.
m = /(.)(.)(\d+)(\d)/.match("THX1138.") m.length #=> 5 m.size #=> 5
This says “you can break a line here if necessary”, and a width-column text sep is inserted if a line is not broken at the point.
If sep is not specified, “ ” is used.
If width is not specified, sep.length is used. You will have to specify this when sep is a multibyte character, for example.
Removes an object hierarchy from the data store, by name.
WARNING: This method is only valid in a PStore#transaction and it cannot be read-only. It will raise PStore::Error if called at any other time.
Returns true if int is an odd number.
Sets default task values
Removes all elements and returns self.
Deletes the given object from the set and returns self. Use subtract to delete many items at once.
Deletes the given object from the set and returns self. If the object is not in the set, returns nil.
Activates the trace
Return true if trace was enabled. Return false if trace was disabled.
trace.enabled? #=> false trace.enable #=> false (previous state) # trace is enabled trace.enabled? #=> true trace.enable #=> true (previous state) # trace is still enabled
If a block is given, the trace will only be enabled within the scope of the block.
trace.enabled? #=> false trace.enable do trace.enabled? # only enabled for this block end trace.enabled? #=> false
Note: You cannot access event hooks within the block.
trace.enable { p tp.lineno } #=> RuntimeError: access from outside
Deactivates the trace
Return true if trace was enabled. Return false if trace was disabled.
trace.enabled? #=> true trace.disable #=> false (previous status) trace.enabled? #=> false trace.disable #=> false
If a block is given, the trace will only be disable within the scope of the block.
trace.enabled? #=> true trace.disable do trace.enabled? # only disabled for this block end trace.enabled? #=> true
Note: You cannot access event hooks within the block.
trace.disable { p tp.lineno } #=> RuntimeError: access from outside
The current status of the trace
Returns x+i*y;
Complex(1, 2) #=> (1+2i) Complex('1+2i') #=> (1+2i) Complex(nil) #=> TypeError Complex(1, nil) #=> TypeError
Syntax of string form:
string form = extra spaces , complex , extra spaces ;
complex = real part | [ sign ] , imaginary part
| real part , sign , imaginary part
| rational , "@" , rational ;
real part = rational ;
imaginary part = imaginary unit | unsigned rational , imaginary unit ;
rational = [ sign ] , unsigned rational ;
unsigned rational = numerator | numerator , "/" , denominator ;
numerator = integer part | fractional part | integer part , fractional part ;
denominator = digits ;
integer part = digits ;
fractional part = "." , digits , [ ( "e" | "E" ) , [ sign ] , digits ] ;
imaginary unit = "i" | "I" | "j" | "J" ;
sign = "-" | "+" ;
digits = digit , { digit | "_" , digit };
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
extra spaces = ? \s* ? ;
See String#to_c.