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

Instance Attribute Summary

::String - Inherited

#ascii_only?

Returns true for a string which has only ASCII characters.

#empty?,
#valid_encoding?

Returns true for a string which is encoded correctly.

Instance Method Summary

::String - Inherited

#%, #*, #+, #+@, #-@, #<<, #<=>, #==, #===, #=~,
#[]

Returns the substring of self specified by the arguments.

#[]=

Element Assignment—Replaces some or all of the content of str.

#b

Returns a copied string whose encoding is ASCII-8BIT.

#bytes

Returns an array of bytes in str.

#bytesize,
#byteslice

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

#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, #casecmp?,
#center

Centers str in width.

#chars

Returns an array of characters in str.

#chomp

Returns a new ::String with the given record separator removed from the end of str (if present).

#chomp!

Modifies str in place as described for String#chomp, returning str, or nil if no modifications were made.

#chop

Returns a new ::String with the last character removed.

#chop!

Processes str as for String#chop, returning str, or nil if str is the empty string.

#chr

Returns a string containing the first character of self:

#clear

Removes the contents of self:

#codepoints

Returns an array of the ::Integer ordinals of the characters in str.

#concat,
#count

Each other_str parameter defines a set of characters to count.

#crypt

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

#delete

Returns a copy of str with all characters in the intersection of its arguments deleted.

#delete!

Performs a delete operation in place, returning str, or nil if str was not modified.

#delete_prefix

Returns a copy of str with leading prefix deleted.

#delete_prefix!

Deletes leading prefix from str, returning nil if no change was made.

#delete_suffix

Returns a copy of str with trailing suffix deleted.

#delete_suffix!

Deletes trailing suffix from str, returning nil if no change was made.

#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

Passes each byte in str to the given block, or returns an enumerator if no block is given.

#each_char

Passes each character in str to the given block, or returns an enumerator if no block is given.

#each_codepoint

Passes the ::Integer ordinal of each character in str, also known as a codepoint when applied to Unicode strings to the given block.

#each_grapheme_cluster

Passes each grapheme cluster in str to the given block, or returns an enumerator if no block is given.

#each_line

Splits str using the supplied parameter as the record separator ($/ by default), passing each substring in turn to the supplied block.

#encode

The first form returns a copy of str transcoded to encoding encoding.

#encode!

The first form transcodes the contents of str from str.encoding to encoding.

#encoding

Alias for Regexp#encoding.

#end_with?

Returns true if str ends with one of the suffixes given.

#eql?,
#force_encoding

Changes the encoding to encoding and returns self.

#freeze,
#getbyte

Returns the byte at zero-based index as an integer:

#grapheme_clusters

Returns an array of grapheme clusters in str.

#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,
#hex

Treats leading characters from str as a string of hexadecimal digits (with an optional sign and an optional 0x) and returns the corresponding number.

#include?

Returns true if self contains other_string, false otherwise:

#index,
#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,
#lines

Returns an array of lines in str split using the supplied record separator ($/ by default).

#ljust

If integer is greater than the length of str, returns a new ::String of length integer with str left justified and padded with padstr; otherwise, returns str.

#lstrip

Returns a copy of the receiver with leading whitespace removed.

#lstrip!

Removes leading whitespace from the receiver.

#match, #match?,
#next

Returns the successor to self.

#next!

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

#oct

Treats leading characters of str as a string of octal digits (with an optional sign) and returns the corresponding number.

#ord

Returns the ::Integer ordinal of a one-character string.

#partition

Searches sep or pattern (regexp) in the string and returns the part before it, the match, and the part after it.

#prepend,
#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,
#rjust

If integer is greater than the length of str, returns a new ::String of length integer with str right justified and padded with padstr; otherwise, returns str.

#rpartition

Searches sep or pattern (regexp) in the string from the end of the string, and returns the part before it, the match, and the part after it.

#rstrip

Returns a copy of the receiver with trailing whitespace removed.

#rstrip!

Removes trailing whitespace from the receiver.

#scan

Both forms iterate through str, matching the pattern (which may be a ::Regexp or a ::String).

#scrub

If the string is invalid byte sequence then replace invalid bytes with given replacement character, else returns self.

#scrub!

If the string is invalid byte sequence then replace invalid bytes with given replacement character, else returns self.

#setbyte

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

#size,
#slice

Alias for String#[].

#slice!

Removes the substring of self specified by the arguments; returns the removed substring.

#split

Divides str into substrings based on a delimiter, returning an array of these substrings.

#squeeze

Builds a set of characters from the other_str parameter(s) using the procedure described for String#count.

#squeeze!

Squeezes str in place, returning either str, or nil if no changes were made.

#start_with?

Returns true if str starts with one of the prefixes given.

#strip

Returns a copy of the receiver with leading and trailing whitespace removed.

#strip!

Removes leading and trailing whitespace from the receiver.

#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 str, where n is the optional ::Integer parameter, defaulting to 16.

#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 a complex which denotes the string form.

#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 (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 str with the characters in from_str replaced by the corresponding characters in to_str.

#tr!

Translates str in place, using the same rules as String#tr.

#tr_s

Processes a copy of str as described under String#tr, then removes duplicate characters in regions that were affected by the translation.

#tr_s!

Performs String#tr_s processing on str in place, returning str, or nil if no changes were made.

#undump

Returns an unescaped version of self:

#unicode_normalize

Unicode Normalization—Returns a normalized form of str, using Unicode normalizations NFC, NFD, NFKC, or NFKD.

#unicode_normalize!

Destructive version of String#unicode_normalize, doing Unicode normalization in place.

#unicode_normalized?

Checks whether str is in Unicode normalization form form, which can be any of the four values :nfc, :nfd, :nfkc, or :nfkd.

#unpack

Decodes str (which may contain binary data) according to the format string, returning an array of each value extracted.

#unpack1

Decodes str (which may contain binary data) according to the format string, returning the first value extracted.

#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:

::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 544

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