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"
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 be wrong.
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.