diff --git a/io.c b/io.c index f4c7476314..b5582db5af 100644 --- a/io.c +++ b/io.c @@ -14508,133 +14508,133 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y) * * === Creating * - * - ::new (aliased as ::for_fd):: Creates and returns a new \IO object for the given - * integer file descriptor. - * - ::open:: Creates a new \IO object. - * - ::pipe:: Creates a connected pair of reader and writer \IO objects. - * - ::popen:: Creates an \IO object to interact with a subprocess. - * - ::select:: Selects which given \IO instances are ready for reading, + * - ::new (aliased as ::for_fd): Creates and returns a new \IO object for the given + * integer file descriptor. + * - ::open: Creates a new \IO object. + * - ::pipe: Creates a connected pair of reader and writer \IO objects. + * - ::popen: Creates an \IO object to interact with a subprocess. + * - ::select: Selects which given \IO instances are ready for reading, * writing, or have pending exceptions. * * === Reading * - * - ::binread:: Returns a binary string with all or a subset of bytes - * from the given file. - * - ::read:: Returns a string with all or a subset of bytes from the given file. - * - ::readlines:: Returns an array of strings, which are the lines from the given file. - * - #getbyte:: Returns the next 8-bit byte read from +self+ as an integer. - * - #getc:: Returns the next character read from +self+ as a string. - * - #gets:: Returns the line read from +self+. - * - #pread:: Returns all or the next _n_ bytes read from +self+, - * not updating the receiver's offset. - * - #read:: Returns all remaining or the next _n_ bytes read from +self+ - * for a given _n_. - * - #read_nonblock:: the next _n_ bytes read from +self+ for a given _n_, - * in non-block mode. - * - #readbyte:: Returns the next byte read from +self+; - * same as #getbyte, but raises an exception on end-of-file. - * - #readchar:: Returns the next character read from +self+; - * same as #getc, but raises an exception on end-of-file. - * - #readline:: Returns the next line read from +self+; - * same as #getline, but raises an exception of end-of-file. - * - #readlines:: Returns an array of all lines read read from +self+. - * - #readpartial:: Returns up to the given number of bytes from +self+. + * - ::binread: Returns a binary string with all or a subset of bytes + * from the given file. + * - ::read: Returns a string with all or a subset of bytes from the given file. + * - ::readlines: Returns an array of strings, which are the lines from the given file. + * - #getbyte: Returns the next 8-bit byte read from +self+ as an integer. + * - #getc: Returns the next character read from +self+ as a string. + * - #gets: Returns the line read from +self+. + * - #pread: Returns all or the next _n_ bytes read from +self+, + * not updating the receiver's offset. + * - #read: Returns all remaining or the next _n_ bytes read from +self+ + * for a given _n_. + * - #read_nonblock: the next _n_ bytes read from +self+ for a given _n_, + * in non-block mode. + * - #readbyte: Returns the next byte read from +self+; + * same as #getbyte, but raises an exception on end-of-file. + * - #readchar: Returns the next character read from +self+; + * same as #getc, but raises an exception on end-of-file. + * - #readline: Returns the next line read from +self+; + * same as #getline, but raises an exception of end-of-file. + * - #readlines: Returns an array of all lines read read from +self+. + * - #readpartial: Returns up to the given number of bytes from +self+. * * === Writing * - * - ::binwrite:: Writes the given string to the file at the given filepath, - * in binary mode. - * - ::write:: Writes the given string to +self+. - * - ::<<:: Appends the given string to +self+. - * - #print:: Prints last read line or given objects to +self+. - * - #printf:: Writes to +self+ based on the given format string and objects. - * - #putc:: Writes a character to +self+. - * - #puts:: Writes lines to +self+, making sure line ends with a newline. - * - #pwrite:: Writes the given string at the given offset, - * not updating the receiver's offset. - * - #write:: Writes one or more given strings to +self+. - * - #write_nonblock:: Writes one or more given strings to +self+ in non-blocking mode. + * - ::binwrite: Writes the given string to the file at the given filepath, + * in binary mode. + * - ::write: Writes the given string to +self+. + * - #<<: Appends the given string to +self+. + * - #print: Prints last read line or given objects to +self+. + * - #printf: Writes to +self+ based on the given format string and objects. + * - #putc: Writes a character to +self+. + * - #puts: Writes lines to +self+, making sure line ends with a newline. + * - #pwrite: Writes the given string at the given offset, + * not updating the receiver's offset. + * - #write: Writes one or more given strings to +self+. + * - #write_nonblock: Writes one or more given strings to +self+ in non-blocking mode. * * === Positioning * - * - #lineno:: Returns the current line number in +self+. - * - #lineno=:: Sets the line number is +self+. - * - #pos (aliased as #tell):: Returns the current byte offset in +self+. - * - #pos=:: Sets the byte offset in +self+. - * - #reopen:: Reassociates +self+ with a new or existing \IO stream. - * - #rewind:: Positions +self+ to the beginning of input. - * - #seek:: Sets the offset for +self+ relative to given position. + * - #lineno: Returns the current line number in +self+. + * - #lineno=: Sets the line number is +self+. + * - #pos (aliased as #tell): Returns the current byte offset in +self+. + * - #pos=: Sets the byte offset in +self+. + * - #reopen: Reassociates +self+ with a new or existing \IO stream. + * - #rewind: Positions +self+ to the beginning of input. + * - #seek: Sets the offset for +self+ relative to given position. * * === Iterating * - * - ::foreach:: Yields each line of given file to the block. - * - #each (aliased as #each_line):: Calls the given block - * with each successive line in +self+. - * - #each_byte:: Calls the given block with each successive byte in +self+ - * as an integer. - * - #each_char:: Calls the given block with each successive character in +self+ - * as a string. - * - #each_codepoint:: Calls the given block with each successive codepoint in +self+ - * as an integer. + * - ::foreach: Yields each line of given file to the block. + * - #each (aliased as #each_line): Calls the given block + * with each successive line in +self+. + * - #each_byte: Calls the given block with each successive byte in +self+ + * as an integer. + * - #each_char: Calls the given block with each successive character in +self+ + * as a string. + * - #each_codepoint: Calls the given block with each successive codepoint in +self+ + * as an integer. * * === Settings * - * - #autoclose=:: Sets whether +self+ auto-closes. - * - #binmode:: Sets +self+ to binary mode. - * - #close:: Closes +self+. - * - #close_on_exec=:: Sets the close-on-exec flag. - * - #close_read:: Closes +self+ for reading. - * - #close_write:: Closes +self+ for writing. - * - #set_encoding:: Sets the encoding for +self+. - * - #set_encoding_by_bom:: Sets the encoding for +self+, based on its - * Unicode byte-order-mark. - * - #sync=:: Sets the sync-mode to the given value. + * - #autoclose=: Sets whether +self+ auto-closes. + * - #binmode: Sets +self+ to binary mode. + * - #close: Closes +self+. + * - #close_on_exec=: Sets the close-on-exec flag. + * - #close_read: Closes +self+ for reading. + * - #close_write: Closes +self+ for writing. + * - #set_encoding: Sets the encoding for +self+. + * - #set_encoding_by_bom: Sets the encoding for +self+, based on its + * Unicode byte-order-mark. + * - #sync=: Sets the sync-mode to the given value. * * === Querying * - * - #autoclose?:: Returns whether +self+ auto-closes. - * - #binmode?:: Returns whether +self+ is in binary mode. - * - #close_on_exec?:: Returns the close-on-exec flag for +self+. - * - #closed?:: Returns whether +self+ is closed. - * - #eof? (aliased as #eof):: Returns whether +self+ is at end-of-file. - * - #external_encoding:: Returns the external encoding object for +self+. - * - #fileno (aliased as #to_i):: Returns the integer file descriptor for +self+ - * - #internal_encoding:: Returns the internal encoding object for +self+. - * - #pid:: Returns the process ID of a child process associated with +self+, - * if +self+ was created by ::popen. - * - #stat:: Returns the File::Stat object containing status information for +self+. - * - #sync:: Returns whether +self+ is in sync-mode. - * - #tty (aliased as #isatty):: Returns whether +self+ is a terminal. + * - #autoclose?: Returns whether +self+ auto-closes. + * - #binmode?: Returns whether +self+ is in binary mode. + * - #close_on_exec?: Returns the close-on-exec flag for +self+. + * - #closed?: Returns whether +self+ is closed. + * - #eof? (aliased as #eof): Returns whether +self+ is at end-of-file. + * - #external_encoding: Returns the external encoding object for +self+. + * - #fileno (aliased as #to_i): Returns the integer file descriptor for +self+ + * - #internal_encoding: Returns the internal encoding object for +self+. + * - #pid: Returns the process ID of a child process associated with +self+, + * if +self+ was created by ::popen. + * - #stat: Returns the File::Stat object containing status information for +self+. + * - #sync: Returns whether +self+ is in sync-mode. + * - #tty? (aliased as #isatty): Returns whether +self+ is a terminal. * * === Buffering * - * - #fdatasync:: Immediately writes all buffered data in +self+ to disk. - * - #flush:: Flushes any buffered data within +self+ to the underlying - * operating system. - * - #fsync:: Immediately writes all buffered data and attributes in +self+ to disk. - * - #ungetbyte:: Prepends buffer for +self+ with given integer byte or string. - * - #ungetc:: Prepends buffer for +self+ with given string. + * - #fdatasync: Immediately writes all buffered data in +self+ to disk. + * - #flush: Flushes any buffered data within +self+ to the underlying + * operating system. + * - #fsync: Immediately writes all buffered data and attributes in +self+ to disk. + * - #ungetbyte: Prepends buffer for +self+ with given integer byte or string. + * - #ungetc: Prepends buffer for +self+ with given string. * * === Low-Level Access * - * - ::sysopen:: Opens the file given by its path, - * returning the integer file descriptor. - * - #advise:: Announces the intention to access data from +self+ in a specific way. - * - #fcntl:: Passes a low-level command to the file specified - * by the given file descriptor. - * - #ioctl:: Passes a low-level command to the device specified - * by the given file descriptor. - * - #sysread:: Returns up to the next _n_ bytes read from self using a low-level read. - * - #sysseek:: Sets the offset for +self+. - * - #syswrite:: Writes the given string to +self+ using a low-level write. + * - ::sysopen: Opens the file given by its path, + * returning the integer file descriptor. + * - #advise: Announces the intention to access data from +self+ in a specific way. + * - #fcntl: Passes a low-level command to the file specified + * by the given file descriptor. + * - #ioctl: Passes a low-level command to the device specified + * by the given file descriptor. + * - #sysread: Returns up to the next _n_ bytes read from self using a low-level read. + * - #sysseek: Sets the offset for +self+. + * - #syswrite: Writes the given string to +self+ using a low-level write. * * === Other * - * - ::copy_stream:: Copies data from a source to a destination, - * each of which is a filepath or an \IO-like object. - * - ::try_convert:: Returns a new \IO object resulting from converting - * the given object. - * - #inspect:: Returns the string representation of +self+. + * - ::copy_stream: Copies data from a source to a destination, + * each of which is a filepath or an \IO-like object. + * - ::try_convert: Returns a new \IO object resulting from converting + * the given object. + * - #inspect: Returns the string representation of +self+. * */ diff --git a/numeric.c b/numeric.c index 0e33c0f4ba..ce9537d8d6 100644 --- a/numeric.c +++ b/numeric.c @@ -968,46 +968,45 @@ num_negative_p(VALUE num) * * === Querying * - * - #finite?:: Returns whether +self+ is finite. - * - #hash:: Returns the integer hash code for +self+. - * - #infinite?:: Returns whether +self+ is infinite. - * - #nan?:: Returns whether +self+ is a NaN (not-a-number). + * - #finite?: Returns whether +self+ is finite. + * - #hash: Returns the integer hash code for +self+. + * - #infinite?: Returns whether +self+ is infinite. + * - #nan?: Returns whether +self+ is a NaN (not-a-number). * * === Comparing * - * - #<:: Returns whether +self+ is less than the given value. - * - #<=:: Returns whether +self+ is less than or equal to the given value. - * - #<=>:: Returns a number indicating whether +self+ is less than, equal - * to, or greater than the given value. - * - #== (aliased as #=== and #eql?):: Returns whether +self+ is equal to - * the given value. - * - #>:: Returns whether +self+ is greater than the given value. - * - #>=:: Returns whether +self+ is greater than or equal to the given - * value. + * - {<}[#method-i-3C]: Returns whether +self+ is less than the given value. + * - {<=}[#method-i-3C-3D]: Returns whether +self+ is less than or equal to the given value. + * - {<=>}[#method-i-3C-3D-3E]: Returns a number indicating whether +self+ is less than, equal + * to, or greater than the given value. + * - #== (aliased as #=== and #eql?): Returns whether +self+ is equal to + * the given value. + * - {>}[#method-i-3E]: Returns whether +self+ is greater than the given value. + * - {>=}[#method-i-3E-3D]: Returns whether +self+ is greater than or equal to the given value. * * === Converting * - * - #% (aliased as #modulo):: Returns +self+ modulo the given value. - * - #*:: Returns the product of +self+ and the given value. - * - #**:: Returns the value of +self+ raised to the power of the given value. - * - #+:: Returns the sum of +self+ and the given value. - * - #-:: Returns the difference of +self+ and the given value. - * - #/:: Returns the quotient of +self+ and the given value. - * - #ceil:: Returns the smallest number greater than or equal to +self+. - * - #coerce:: Returns a 2-element array containing the given value converted to a \Float - and +self+ - * - #divmod:: Returns a 2-element array containing the quotient and remainder - * results of dividing +self+ by the given value. - * - #fdiv:: Returns the Float result of dividing +self+ by the given value. - * - #floor:: Returns the greatest number smaller than or equal to +self+. - * - #next_float:: Returns the next-larger representable \Float. - * - #prev_float:: Returns the next-smaller representable \Float. - * - #quo:: Returns the quotient from dividing +self+ by the given value. - * - #round:: Returns +self+ rounded to the nearest value, to a given precision. - * - #to_i (aliased as #to_int):: Returns +self+ truncated to an Integer. - * - #to_s (aliased as #inspect):: Returns a string containing the place-value - * representation of +self+ in the given radix. - * - #truncate:: Returns +self+ truncated to a given precision. + * - #% (aliased as #modulo): Returns +self+ modulo the given value. + * - #*: Returns the product of +self+ and the given value. + * - #**: Returns the value of +self+ raised to the power of the given value. + * - #+: Returns the sum of +self+ and the given value. + * - #-: Returns the difference of +self+ and the given value. + * - {/}[#method-i-2F]: Returns the quotient of +self+ and the given value. + * - #ceil: Returns the smallest number greater than or equal to +self+. + * - #coerce: Returns a 2-element array containing the given value converted to a \Float + and +self+ + * - #divmod: Returns a 2-element array containing the quotient and remainder + * results of dividing +self+ by the given value. + * - #fdiv: Returns the Float result of dividing +self+ by the given value. + * - #floor: Returns the greatest number smaller than or equal to +self+. + * - #next_float: Returns the next-larger representable \Float. + * - #prev_float: Returns the next-smaller representable \Float. + * - #quo: Returns the quotient from dividing +self+ by the given value. + * - #round: Returns +self+ rounded to the nearest value, to a given precision. + * - #to_i (aliased as #to_int): Returns +self+ truncated to an Integer. + * - #to_s (aliased as #inspect): Returns a string containing the place-value + * representation of +self+ in the given radix. + * - #truncate: Returns +self+ truncated to a given precision. * */ @@ -3505,66 +3504,65 @@ rb_num2ull(VALUE val) * * === Querying * - * - #allbits?:: Returns whether all bits in +self+ are set. - * - #anybits?:: Returns whether any bits in +self+ are set. - * - #nobits?:: Returns whether no bits in +self+ are set. + * - #allbits?: Returns whether all bits in +self+ are set. + * - #anybits?: Returns whether any bits in +self+ are set. + * - #nobits?: Returns whether no bits in +self+ are set. * * === Comparing * - * - #<:: Returns whether +self+ is less than the given value. - * - #<=:: Returns whether +self+ is less than or equal to the given value. - * - #<=>:: Returns a number indicating whether +self+ is less than, equal - * to, or greater than the given value. - * - #== (aliased as #===):: Returns whether +self+ is equal to the given + * - {<}[#method-i-3C]: Returns whether +self+ is less than the given value. + * - {<=}[#method-i-3C-3D]: Returns whether +self+ is less than or equal to the given value. + * - {<=>}[#method-i-3C-3D-3E]: Returns a number indicating whether +self+ is less than, equal + * to, or greater than the given value. + * - #== (aliased as #===): Returns whether +self+ is equal to the given * value. - * - #>:: Returns whether +self+ is greater than the given value. - * - #>=:: Returns whether +self+ is greater than or equal to the given - * value. + * - {>}[#method-i-3E]: Returns whether +self+ is greater than the given value. + * - {>=}[#method-i-3E-3D]: Returns whether +self+ is greater than or equal to the given value. * * === Converting * - * - ::sqrt:: Returns the integer square root of the given value. - * - ::try_convert:: Returns the given value converted to an \Integer. - * - #% (aliased as #modulo):: Returns +self+ modulo the given value. - * - #&:: Returns the bitwise AND of +self+ and the given value. - * - #*:: Returns the product of +self+ and the given value. - * - #**:: Returns the value of +self+ raised to the power of the given value. - * - #+:: Returns the sum of +self+ and the given value. - * - #-:: Returns the difference of +self+ and the given value. - * - #/:: Returns the quotient of +self+ and the given value. - * - #<<:: Returns the value of +self+ after a leftward bit-shift. - * - #>>:: Returns the value of +self+ after a rightward bit-shift. - * - #[]:: Returns a slice of bits from +self+. - * - #^:: Returns the bitwise EXCLUSIVE OR of +self+ and the given value. - * - #ceil:: Returns the smallest number greater than or equal to +self+. - * - #chr:: Returns a 1-character string containing the character - * represented by the value of +self+. - * - #digits:: Returns an array of integers representing the base-radix digits - * of +self+. - * - #div:: Returns the integer result of dividing +self+ by the given value. - * - #divmod:: Returns a 2-element array containing the quotient and remainder - * results of dividing +self+ by the given value. - * - #fdiv:: Returns the Float result of dividing +self+ by the given value. - * - #floor:: Returns the greatest number smaller than or equal to +self+. - * - #pow:: Returns the modular exponentiation of +self+. - * - #pred:: Returns the integer predecessor of +self+. - * - #remainder:: Returns the remainder after dividing +self+ by the given value. - * - #round:: Returns +self+ rounded to the nearest value with the given precision. - * - #succ (aliased as #next):: Returns the integer successor of +self+. - * - #to_f:: Returns +self+ converted to a Float. - * - #to_s (aliased as #inspect):: Returns a string containing the place-value - * representation of +self+ in the given radix. - * - #truncate:: Returns +self+ truncated to the given precision. - * - #/:: Returns the bitwise OR of +self+ and the given value. + * - ::sqrt: Returns the integer square root of the given value. + * - ::try_convert: Returns the given value converted to an \Integer. + * - #% (aliased as #modulo): Returns +self+ modulo the given value. + * - {&}[#method-i-26]: Returns the bitwise AND of +self+ and the given value. + * - #*: Returns the product of +self+ and the given value. + * - #**: Returns the value of +self+ raised to the power of the given value. + * - #+: Returns the sum of +self+ and the given value. + * - #-: Returns the difference of +self+ and the given value. + * - {/}[#method-i-2F]: Returns the quotient of +self+ and the given value. + * - #<<: Returns the value of +self+ after a leftward bit-shift. + * - #>>: Returns the value of +self+ after a rightward bit-shift. + * - #[]: Returns a slice of bits from +self+. + * - {^}[#method-i-5E]: Returns the bitwise EXCLUSIVE OR of +self+ and the given value. + * - #ceil: Returns the smallest number greater than or equal to +self+. + * - #chr: Returns a 1-character string containing the character + * represented by the value of +self+. + * - #digits: Returns an array of integers representing the base-radix digits + * of +self+. + * - #div: Returns the integer result of dividing +self+ by the given value. + * - #divmod: Returns a 2-element array containing the quotient and remainder + * results of dividing +self+ by the given value. + * - #fdiv: Returns the Float result of dividing +self+ by the given value. + * - #floor: Returns the greatest number smaller than or equal to +self+. + * - #pow: Returns the modular exponentiation of +self+. + * - #pred: Returns the integer predecessor of +self+. + * - #remainder: Returns the remainder after dividing +self+ by the given value. + * - #round: Returns +self+ rounded to the nearest value with the given precision. + * - #succ (aliased as #next): Returns the integer successor of +self+. + * - #to_f: Returns +self+ converted to a Float. + * - #to_s (aliased as #inspect): Returns a string containing the place-value + * representation of +self+ in the given radix. + * - #truncate: Returns +self+ truncated to the given precision. + * - {|}[#method-i-7C]: Returns the bitwise OR of +self+ and the given value. * * === Other * - * - #downto:: Calls the given block with each integer value from +self+ - * down to the given value. - * - #times:: Calls the given block +self+ times with each integer - * in (0..self-1). - * - #upto:: Calls the given block with each integer value from +self+ - * up to the given value. + * - #downto: Calls the given block with each integer value from +self+ + * down to the given value. + * - #times: Calls the given block +self+ times with each integer + * in (0..self-1). + * - #upto: Calls the given block with each integer value from +self+ + * up to the given value. * */ @@ -6109,68 +6107,70 @@ int_s_try_convert(VALUE self, VALUE num) * * === Querying * - * - #finite?:: Returns true unless +self+ is infinite or not a number. - * - #infinite?:: Returns -1, +nil+ or +1, depending on whether +self+ - * is -Infinity, finite, or +Infinity. - * - #integer?:: Returns whether +self+ is an integer. - * - #negative?:: Returns whether +self+ is negative. - * - #nonzero?:: Returns whether +self+ is not zero. - * - #positive?:: Returns whether +self+ is positive. - * - #real?:: Returns whether +self+ is a real value. - * - #zero?:: Returns whether +self+ is zero. + * - #finite?: Returns true unless +self+ is infinite or not a number. + * - #infinite?: Returns -1, +nil+ or +1, depending on whether +self+ + * is -Infinity, finite, or +Infinity. + * - #integer?: Returns whether +self+ is an integer. + * - #negative?: Returns whether +self+ is negative. + * - #nonzero?: Returns whether +self+ is not zero. + * - #positive?: Returns whether +self+ is positive. + * - #real?: Returns whether +self+ is a real value. + * - #zero?: Returns whether +self+ is zero. * * === Comparing * - * - #<=>:: Returns: + * - {<=>}[#method-i-3C-3D-3E]: Returns: + * * - -1 if +self+ is less than the given value. * - 0 if +self+ is equal to the given value. * - 1 if +self+ is greater than the given value. * - +nil+ if +self+ and the given value are not comparable. - * - #eql?:: Returns whether +self+ and the given value have the same value and type. + * + * - #eql?: Returns whether +self+ and the given value have the same value and type. * * === Converting * - * - #% (aliased as #modulo):: Returns the remainder of +self+ divided by the given value. - * - #-@:: Returns the value of +self+, negated. - * - #abs (aliased as #magnitude):: Returns the absolute value of +self+. - * - #abs2:: Returns the square of +self+. - * - #angle (aliased as #arg and #phase):: Returns 0 if +self+ is positive, - * Math::PI otherwise. - * - #ceil:: Returns the smallest number greater than or equal to +self+, - * to a given precision. - * - #coerce:: Returns array [coerced_self, coerced_other] - * for the given other value. - * - #conj (aliased as #conjugate):: Returns the complex conjugate of +self+. - * - #denominator:: Returns the denominator (always positive) - * of the Rational representation of +self+. - * - #div:: Returns the value of +self+ divided by the given value - * and converted to an integer. - * - #divmod:: Returns array [quotient, modulus] resulting - * from dividing +self+ the given divisor. - * - #fdiv:: Returns the Float result of dividing +self+ by the given divisor. - * - #floor:: Returns the largest number less than or equal to +self+, - * to a given precision. - * - #i:: Returns the Complex object Complex(0, self). - * the given value. - * - #imaginary (aliased as #imag):: Returns the imaginary part of the +self+. - * - #numerator:: Returns the numerator of the Rational representation of +self+; - * has the same sign as +self+. - * - #polar:: Returns the array [self.abs, self.arg]. - * - #quo:: Returns the value of +self+ divided by the given value. - * - #real:: Returns the real part of +self+. - * - #rect (aliased as #rectangular):: Returns the array [self, 0]. - * - #remainder:: Returns self-arg*(self/arg).truncate for the given +arg+. - * - #round:: Returns the value of +self+ rounded to the nearest value - * for the given a precision. - * - #to_c:: Returns the Complex representation of +self+. - * - #to_int:: Returns the Integer representation of +self+, truncating if necessary. - * - #truncate:: Returns +self+ truncated (toward zero) to a given precision. + * - #% (aliased as #modulo): Returns the remainder of +self+ divided by the given value. + * - #-@: Returns the value of +self+, negated. + * - #abs (aliased as #magnitude): Returns the absolute value of +self+. + * - #abs2: Returns the square of +self+. + * - #angle (aliased as #arg and #phase): Returns 0 if +self+ is positive, + * Math::PI otherwise. + * - #ceil: Returns the smallest number greater than or equal to +self+, + * to a given precision. + * - #coerce: Returns array [coerced_self, coerced_other] + * for the given other value. + * - #conj (aliased as #conjugate): Returns the complex conjugate of +self+. + * - #denominator: Returns the denominator (always positive) + * of the Rational representation of +self+. + * - #div: Returns the value of +self+ divided by the given value + * and converted to an integer. + * - #divmod: Returns array [quotient, modulus] resulting + * from dividing +self+ the given divisor. + * - #fdiv: Returns the Float result of dividing +self+ by the given divisor. + * - #floor: Returns the largest number less than or equal to +self+, + * to a given precision. + * - #i: Returns the Complex object Complex(0, self). + * the given value. + * - #imaginary (aliased as #imag): Returns the imaginary part of the +self+. + * - #numerator: Returns the numerator of the Rational representation of +self+; + * has the same sign as +self+. + * - #polar: Returns the array [self.abs, self.arg]. + * - #quo: Returns the value of +self+ divided by the given value. + * - #real: Returns the real part of +self+. + * - #rect (aliased as #rectangular): Returns the array [self, 0]. + * - #remainder: Returns self-arg*(self/arg).truncate for the given +arg+. + * - #round: Returns the value of +self+ rounded to the nearest value + * for the given a precision. + * - #to_c: Returns the Complex representation of +self+. + * - #to_int: Returns the Integer representation of +self+, truncating if necessary. + * - #truncate: Returns +self+ truncated (toward zero) to a given precision. * * === Other * - * - #clone:: Returns +self+; does not allow freezing. - * - #dup (aliased as #+@):: Returns +self+. - * - #step:: Invokes the given block with the sequence of specified numbers. + * - #clone: Returns +self+; does not allow freezing. + * - #dup (aliased as #+@): Returns +self+. + * - #step: Invokes the given block with the sequence of specified numbers. * */ void