Takes file
, a String with the location of a Ruby source file, reads, parses and compiles the file, and returns iseq
, the compiled InstructionSequence
with source location metadata set.
Optionally takes options
, which can be true
, false
or a Hash
, to modify the default behavior of the Ruby iseq compiler.
For details regarding valid compile options see ::compile_option=
.
# /tmp/hello.rb puts "Hello, world!" # elsewhere RubyVM::InstructionSequence.compile_file("/tmp/hello.rb") #=> <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>
Deletes a child element.
Must be an Element
, String
, or Integer
. If Element
, the element is removed. If String, the element is found (via XPath
) and removed. <em>This means that any parent can remove any descendant.<em> If Integer
, the Element
indexed by that number will be removed.
the element that was removed.
doc.delete_element "/a/b/c[@id='4']" doc.delete_element doc.elements["//k"] doc.delete_element 1
Removes installed executables and batch files (windows only) for gemspec
.
returns a Time
that represents the Last-Modified field.
Returns true
if the file or directory may be deleted by DELE/RMD.
Set
the entity expansion limit. By default the limit is set to 10240.
Deprecated. Use REXML::Security.entity_expansion_text_limit=
instead.
Get the entity expansion limit. By default the limit is set to 10240.
Deprecated. Use REXML::Security.entity_expansion_text_limit
instead.
wait for all jobs to terminate
Set
the entity expansion limit. By default the limit is set to 10240.
Get the entity expansion limit. By default the limit is set to 10240.
Add the install/update options to the option parser.
Add the –update-sources option
Re-composes a prime factorization and returns the product.
See Prime#int_from_prime_division
for more details.
Unpacks sockaddr into path.
sockaddr should be a string or an addrinfo for AF_UNIX
.
sockaddr = Socket.sockaddr_un("/tmp/sock") p Socket.unpack_sockaddr_un(sockaddr) #=> "/tmp/sock"
Re-composes a prime factorization and returns the product.
See Prime#int_from_prime_division
for more details.
Counts objects size (in bytes) for each type.
Note that this information is incomplete. You need to deal with this information as only a HINT. Especially, total size of T_DATA may not right size.
It returns a hash as:
{:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
The contents of the returned hash is implementation defined. It may be changed in future.
This method is only expected to work with C Ruby.
Counts objects for each T_DATA
type.
This method is only for MRI developers interested in performance and memory usage of Ruby programs.
It returns a hash as:
{RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6, :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99, ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1, Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2} # T_DATA objects existing at startup on r32276.
If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
The contents of the returned hash is implementation specific and may change in the future.
In this version, keys are Class
object or Symbol
object.
If object is kind of normal (accessible) object, the key is Class
object. If object is not a kind of normal (internal) object, the key is symbol name, registered by rb_data_type_struct.
This method is only expected to work with C Ruby.
Verify internal consistency.
This method is implementation specific. Now this method checks generational consistency if RGenGC is supported.
Returns a String containing the API compatibility version of Ruby