123456789_123456789_123456789_123456789_123456789_

Class: Warning::buffer

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::String
Instance Chain:
Inherits: String
Defined in: error.c

Class Method Summary

::String - Inherited

.try_convert

If object is a ::String object, returns object.

.new

Instance Attribute Summary

::String - Inherited

#ascii_only?

Returns true if self contains only ASCII characters, false otherwise:

#empty?

Returns true if the length of self is zero, false otherwise:

#valid_encoding?

Returns true if self is encoded correctly, false otherwise:

Instance Method Summary

::String - Inherited

#%

Returns the result of formatting object into the format specification self (see Kernel.sprintf for formatting details):

#*

Returns a new ::String containing integer copies of self:

#+

Returns a new ::String containing other_string concatenated to self:

#+@

Returns self if self is not frozen.

#-@

Returns a frozen, possibly pre-existing copy of the string.

#<<

Concatenates object to self and returns self:

#<=>

Compares self and other_string, returning:

#==

Returns true if object has the same length and content; as self; false otherwise:

#===

Alias for String#==.

#=~

Returns the ::Integer index of the first substring that matches the given regexp, or nil if no match found:

#[]

Returns the substring of self specified by the arguments.

#[]=

Replaces all, some, or none of the contents of self; returns new_string.

#b

Returns a copy of self that has ASCII-8BIT encoding; the underlying bytes are not modified:

#byteindex

Returns the ::Integer byte-based index of the first occurrence of the given substring, or nil if none found:

#byterindex

Returns the ::Integer byte-based index of the last occurrence of the given substring, or nil if none found:

#bytes

Returns an array of the bytes in self:

#bytesize

Returns the count of bytes (not characters) in self:

#byteslice

Returns a substring of self, or nil if the substring cannot be constructed.

#bytesplice

Replaces some or all of the content of self with str, and returns self.

#capitalize

Returns a string containing the characters in self; the first character is upcased; the remaining characters are downcased:

#capitalize!

Upcases the first character in self; downcases the remaining characters; returns self if any changes were made, nil otherwise:

#casecmp

Compares self.downcase and other_string.downcase; returns:

#casecmp?

Returns true if self and other_string are equal after Unicode case folding, otherwise false:

#center

Returns a centered copy of self.

#chars

Returns an array of the characters in self:

#chomp

Returns a new string copied from self, with trailing characters possibly removed:

#chomp!

Like String#chomp, but modifies self in place; returns nil if no modification made, self otherwise.

#chop

Returns a new string copied from self, with trailing characters possibly removed.

#chop!

Like String#chop, but modifies self in place; returns nil if self is empty, self otherwise.

#chr

Returns a string containing the first character of self:

#clear

Removes the contents of self:

#codepoints

Returns an array of the codepoints in self; each codepoint is the integer value for a character:

#concat

Concatenates each object in objects to self and returns self:

#count

Returns the total number of characters in self that are specified by the given selectors (see Multiple Character Selectors):

#crypt

Returns the string generated by calling crypt(3) standard library function with str and salt_str, in this order, as its arguments.

#dedup

Alias for String#-@.

#delete

Returns a copy of self with characters specified by selectors removed (see Multiple Character Selectors):

#delete!

Like String#delete, but modifies self in place.

#delete_prefix

Returns a copy of self with leading substring prefix removed:

#delete_prefix!

Like String#delete_prefix, except that self is modified in place.

#delete_suffix

Returns a copy of self with trailing substring suffix removed:

#delete_suffix!

Like String#delete_suffix, except that self is modified in place.

#downcase

Returns a string containing the downcased characters in self:

#downcase!

Downcases the characters in self; returns self if any changes were made, nil otherwise:

#dump

Returns a printable version of self, enclosed in double-quotes, with special characters escaped, and with non-printing characters replaced by hexadecimal notation:

#each_byte

Calls the given block with each successive byte from self; returns self:

#each_char

Calls the given block with each successive character from self; returns self:

#each_codepoint

Calls the given block with each successive codepoint from self; each codepoint is the integer value for a character; returns self:

#each_grapheme_cluster
#each_line

With a block given, forms the substrings (???lines???) that are the result of splitting self at each occurrence of the given line separator line_sep; passes each line to the block; returns self:

#encode

Returns a copy of self transcoded as determined by dst_encoding.

#encode!

Like #encode, but applies encoding changes to self; returns self.

#encoding

Alias for Regexp#encoding.

#end_with?

Returns whether self ends with any of the given strings.

#eql?

Returns true if object has the same length and content; as self; false otherwise:

#force_encoding

Changes the encoding of self to encoding, which may be a string encoding name or an ::Encoding object; returns self:

#getbyte

Returns the byte at zero-based index as an integer, or nil if index is out of range:

#grapheme_clusters

Returns an array of the grapheme clusters in self (see Unicode Grapheme Cluster Boundaries):

#gsub

Returns a copy of self with all occurrences of the given pattern replaced.

#gsub!

Performs the specified substring replacement(s) on self; returns self if any replacement occurred, nil otherwise.

#hash

Returns the integer hash value for self.

#hex

Interprets the leading substring of self as a string of hexadecimal digits (with an optional sign and an optional 0x) and returns the corresponding number; returns zero if there is no such leading substring:

#include?

Returns true if self contains other_string, false otherwise:

#index

Returns the integer index of the first match for the given argument, or nil if none found; the search of self is forward, and begins at position offset (in characters).

#initialize

Returns a new String that is a copy of string.

#initialize_copy

Alias for String#replace.

#insert

Inserts the given other_string into self; returns self.

#inspect

Returns a printable version of self, enclosed in double-quotes, and with special characters escaped:

#intern

Returns the ::Symbol corresponding to str, creating the symbol if it did not previously exist.

#length

Returns the count of characters (not bytes) in self:

#lines

Forms substrings (“lines”) of self according to the given arguments (see String#each_line for details); returns the lines in an array.

#ljust

Returns a left-justified copy of self.

#lstrip

Returns a copy of self with leading whitespace removed; see Whitespace in Strings:

#lstrip!

Like String#lstrip, except that any modifications are made in self; returns self if any modification are made, nil otherwise.

#match

Returns a ::MatchData object (or nil) based on self and the given pattern.

#match?

Returns true or false based on whether a match is found for self and pattern.

#next

Returns the successor to self.

#next!

Equivalent to String#succ, but modifies self in place; returns self.

#oct

Interprets the leading substring of self as a string of octal digits (with an optional sign) and returns the corresponding number; returns zero if there is no such leading substring:

#ord

Returns the integer ordinal of the first character of self:

#partition

Returns a 3-element array of substrings of self.

#prepend

Prepends each string in other_strings to self and returns self:

#replace

Replaces the contents of self with the contents of other_string:

#reverse

Returns a new string with the characters from self in reverse order.

#reverse!

Returns self with its characters reversed:

#rindex

Returns the ::Integer index of the last occurrence of the given substring, or nil if none found:

#rjust

Returns a right-justified copy of self.

#rpartition

Returns a 3-element array of substrings of self.

#rstrip

Returns a copy of the receiver with trailing whitespace removed; see Whitespace in Strings:

#rstrip!

Like String#rstrip, except that any modifications are made in self; returns self if any modification are made, nil otherwise.

#scan

Matches a pattern against self; the pattern is:

#scrub

Returns a copy of self with each invalid byte sequence replaced by the given replacement_string.

#scrub!

Like String#scrub, except that any replacements are made in self.

#setbyte

Sets the byte at zero-based index to integer; returns integer:

#size

Alias for String#length.

#slice

Alias for String#[].

#slice!

Removes and returns the substring of self specified by the arguments.

#split

Returns an array of substrings of self that are the result of splitting self at each occurrence of the given field separator field_sep.

#squeeze

Returns a copy of self with characters specified by selectors “squeezed” (see Multiple Character Selectors):

#squeeze!

Like String#squeeze, but modifies self in place.

#start_with?

Returns whether self starts with any of the given string_or_regexp.

#strip

Returns a copy of the receiver with leading and trailing whitespace removed; see Whitespace in Strings:

#strip!

Like String#strip, except that any modifications are made in self; returns self if any modification are made, nil otherwise.

#sub

Returns a copy of self with only the first occurrence (not all occurrences) of the given pattern replaced.

#sub!

Returns self with only the first occurrence (not all occurrences) of the given pattern replaced.

#succ

Alias for String#next.

#succ!

Alias for String#next!.

#sum

Returns a basic n-bit checksum of the characters in self; the checksum is the sum of the binary value of each byte in self, modulo 2**n - 1:

#swapcase

Returns a string containing the characters in self, with cases reversed; each uppercase character is downcased; each lowercase character is upcased:

#swapcase!

Upcases each lowercase character in self; downcases uppercase character; returns self if any changes were made, nil otherwise:

#to_c

Returns self interpreted as a ::Complex object; leading whitespace and trailing garbage are ignored:

#to_f

Returns the result of interpreting leading characters in self as a ::Float:

#to_i

Returns the result of interpreting leading characters in self as an integer in the given base (which must be in (0, 2..36)):

#to_r

Returns the result of interpreting leading characters in str as a rational.

#to_s

Returns self if self is a ::String, or self converted to a ::String if self is a subclass of ::String.

#to_str

Alias for String#to_s.

#to_sym

Alias for String#intern.

#tr

Returns a copy of self with each character specified by string selector translated to the corresponding character in string replacements.

#tr!

Like String#tr, but modifies self in place.

#tr_s

Like String#tr, but also squeezes the modified portions of the translated string; returns a new string (translated and squeezed).

#tr_s!

Like String#tr_s, but modifies self in place.

#undump

Returns an unescaped version of self:

#unicode_normalize

Returns a copy of self with Unicode normalization applied.

#unicode_normalize!

Like String#unicode_normalize, except that the normalization is performed on self.

#unicode_normalized?

Returns true if self is in the given form of Unicode normalization, false otherwise.

#unpack

Extracts data from self, forming objects that become the elements of a new array; returns that array.

#unpack1

Like String#unpack, but unpacks and returns only the first extracted object.

#upcase

Returns a string containing the upcased characters in self:

#upcase!

Upcases the characters in self; returns self if any changes were made, nil otherwise:

#upto

With a block given, calls the block with each ::String value returned by successive calls to String#succ; the first value is self, the next is self.succ, and so on; the sequence terminates when value other_string is reached; returns self:

#dup, #freeze

::Comparable - Included

#<

Compares two objects based on the receiver’s <=> method, returning true if it returns a value less than 0.

#<=

Compares two objects based on the receiver’s <=> method, returning true if it returns a value less than or equal to 0.

#==

Compares two objects based on the receiver’s <=> method, returning true if it returns 0.

#>

Compares two objects based on the receiver’s <=> method, returning true if it returns a value greater than 0.

#>=

Compares two objects based on the receiver’s <=> method, returning true if it returns a value greater than or equal to 0.

#between?

Returns false if obj <=> min is less than zero or if obj <=> max is greater than zero, true otherwise.

#clamp

In (min, max) form, returns min if obj <=> min is less than zero, max if obj <=> max is greater than zero, and obj otherwise.

Constructor Details

This class inherits a constructor from String

Instance Method Details

#write(*args)

[ GitHub ]

  
# File 'error.c', line 565

static VALUE
warning_write(int argc, VALUE *argv, VALUE buf)
{
    while (argc-- > 0) {
        rb_str_append(buf, *argv++);
    }
    return buf;
}