size

mtch.size â integer Instance Public methods Returns the number of elements in the match array. m = /(.)(.)(\d+)(\d)/.match("THX1138.") m.length #=> 5 m.size #=> 5

string

mtch.string â str Instance Public methods Returns a frozen copy of the string passed in to match. m = /(.)(.)(\d+)(\d)/.match("THX1138.") m.string #=> "THX1138."

to_a

mtch.to_a â anArray Instance Public methods Returns the array of matches. m = /(.)(.)(\d+)(\d)/.match("THX1138.") m.to_a #=> ["HX1138", "H", "X", "113", "8"] Because to_a is called when expanding *variable, there's a useful assignment shortcut for extracting matched fields. This is slightly slower than accessing the fields directly (as an intermediate array is generated). all,f1,f2,f3 = *(/(.)(.)(\d+)(\d)/.match("THX1138.")) all #=> "HX1138" f1 #=> "H" f2 #=&

to_s

mtch.to_s â str Instance Public methods Returns the entire matched string. m = /(.)(.)(\d+)(\d)/.match("THX1138.") m.to_s #=> "HX1138"

values_at

mtch.values_at([index]*) â array Instance Public methods Uses each index to access the matching values, returning an array of the corresponding matches. m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") m.to_a #=> ["HX1138", "H", "X", "113", "8"] m.values_at(0, 2, -2) #=> ["HX1138", "X", "113"]

acos

Math.acos(x) â float Class Public methods Computes the arc cosine of x. Returns 0..PI.

acosh

Math.acosh(x) â float Class Public methods Computes the inverse hyperbolic cosine of x.

asin

Math.asin(x) â float Class Public methods Computes the arc sine of x. Returns -{PI/2} .. {PI/2}.

asinh

Math.asinh(x) â float Class Public methods Computes the inverse hyperbolic sine of x.

atan

Math.atan(x) â float Class Public methods Computes the arc tangent of x. Returns -{PI/2} .. {PI/2}.