Sets the preset dictionary and returns string. This method is available just only after a Zlib::NeedDict exception was raised. See zlib.h for details.
Returns OS code number recorded in the gzip file header.
See Zlib::GzipReader documentation for a description.
Returns the number of the first source line where the instruction sequence was loaded from.
For example, using irb:
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2') #=> <RubyVM::InstructionSequence:<compiled>@<compiled>> iseq.first_lineno #=> 1
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>
Returns a Gem::StubSpecification for default gems
Returns a Gem::StubSpecification for installed gem named name only returns stubs that match Gem.platforms
Return the latest specs, optionally including prerelease specs if prerelease is true.
Sanitize a single string.
Duplicates array_attributes from other_spec so state isn’t shared.
Return a string containing a Ruby code representation of the given object.
Returns a duplicate table object, in column mode. This is handy for chaining in a single call without changing the table mode, but be aware that this method can consume a fair amount of memory for bigger data sets.
This method returns the duplicate table for chaining. Don’t chain destructive methods (like []=()) this way though, since you are working with a duplicate.
Switches the mode of this table to column mode. All calls to indexing and iteration methods will work with columns until the mode is changed again.
This method returns the table and is safe to chain.
Stop this server.
Posts HTML form data to the specified URI object. The form data must be provided as a Hash mapping from String to String. Example:
{ "cmd" => "search", "q" => "ruby", "max" => "50" }
This method also does Basic Authentication iff url.user exists. But userinfo for authentication is deprecated (RFC3986). So this feature will be removed.
Example:
require 'net/http' require 'uri' Net::HTTP.post_form URI('http://www.example.com/search.cgi'), { "q" => "ruby", "max" => "50" }