Returns a copy of self
with all occurrences of the given pattern
replaced.
See Substitution Methods.
Returns an Enumerator
if no replacement
and no block given.
Related: String#sub
, String#sub!
, String#gsub!
.
Equivalent to $_.gsub...
, except that $_
will be updated if substitution occurs. Available only when -p/-n command line option specified.
Represents the use of the ‘super` keyword without parentheses or arguments.
super ^^^^^
The RubyVM
module only exists on MRI. RubyVM
is not defined in other Ruby implementations such as JRuby and TruffleRuby.
The RubyVM
module provides some access to MRI internals. This module is for very limited purposes, such as debugging, prototyping, and research. Normal users must not use it. This module is not portable between Ruby implementations.
An FFI closure wrapper, for handling callbacks.
closure = Class.new(Fiddle::Closure) { def call 10 end }.new(Fiddle::TYPE_INT, []) #=> #<#<Class:0x0000000150d308>:0x0000000150d240> func = Fiddle::Function.new(closure, [], Fiddle::TYPE_INT) #=> #<Fiddle::Function:0x00000001516e58> func.call #=> 10
This exception is raised if the required unicode support is missing on the system. Usually this means that the iconv library is not installed.
Parent class for success (2xx) HTTP
response classes.
A success response indicates the action requested by the client was received, understood, and accepted.
References:
Response class for Unsupported Media Type
responses (status code 415).
The request entity has a media type which the server or resource does not support.
References:
Response class for HTTP Version Not Supported
responses (status code 505).
The server does not support the HTTP
version used in the request.
References:
Response class for Insufficient Storage (WebDAV)
responses (status code 507).
The server is unable to store the representation needed to complete the request.
References:
DesugarCompiler
is a compiler that desugars Ruby code into a more primitive form. This is useful for consumers that want to deal with fewer node types.
Represents an ‘ensure` clause in a `begin` statement.
begin foo ensure ^^^^^^ bar end
Represents the use of the ‘super` keyword with parentheses or arguments.
super() ^^^^^^^ super foo, bar ^^^^^^^^^^^^^^
This represents the result of a call to ::parse or ::parse_file. It contains the requested structure, any comments that were encounters, and any errors that were encountered.
This is a result specific to the ‘parse` and `parse_file` methods.
This is a result specific to the ‘lex` and `lex_file` methods.
This is a result specific to the ‘parse_lex` and `parse_lex_file` methods.
Raised when trying to activate a gem, and that gem does not exist on the system. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError
to catch all types of load errors.
Raised when trying to activate a gem, and the gem exists on the system, but not the requested version. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError
to catch all types of load errors.
Raised when a gem dependencies file specifies a ruby version that does not match the current version.
Gem::PathSupport
facilitates the GEM_HOME and GEM_PATH environment settings to the rest of RubyGems.