Results for: "module_function"

The InstructionSequence class represents a compiled sequence of instructions for the Virtual Machine used in MRI. Not all implementations of Ruby may implement this class, and for the implementations that implement it, the methods defined and behavior of the methods can change in any version.

With it, you can get a handle to the instructions that make up a method or a proc, compile strings of Ruby code down to VM instructions, and disassemble instruction sequences to strings for easy inspection. It is mostly useful if you want to learn how YARV works, but it also lets you control various settings for the Ruby iseq compiler.

You can find the source for the VM instructions in insns.def in the Ruby source.

The instruction sequence results will almost certainly change as Ruby changes, so example output in this documentation may be different from what you see.

Of course, this class is MRI specific.

No documentation available

Mixin methods for –version and –platform Gem::Command options.

A pointer to a C union

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Raised by Gem::Resolver when a Gem::Dependency::Conflict reaches the toplevel. Indicates which dependencies were incompatible through conflict and conflicting_dependencies

Raised when attempting to uninstall a gem that isn’t in GEM_HOME.

No documentation available

Raised by the DependencyInstaller when a specific gem cannot be found

Raised by Encoding and String methods when a transcoding operation fails.

UserInteraction allows RubyGems to interact with the user through standard methods that can be replaced with more-specific UI methods for different displays.

Since UserInteraction dispatches to a concrete UI class you may need to reference other classes for specific behavior such as Gem::ConsoleUI or Gem::SilentUI.

Example:

class X
  include Gem::UserInteraction

  def get_answer
    n = ask("What is the meaning of life?")
  end
end

This is not an existing class, but documentation of the interface that Scheduler object should comply to in order to be used as argument to Fiber.scheduler and handle non-blocking fibers. See also the “Non-blocking fibers” section in Fiber class docs for explanations of some concepts.

Scheduler’s behavior and usage are expected to be as follows:

A typical implementation would probably rely for this closing loop on a gem like EventMachine or Async.

This way concurrent execution will be achieved transparently for every individual Fiber’s code.

Hook methods are:

When not specified otherwise, the hook implementations are mandatory: if they are not implemented, the methods trying to call hook will fail. To provide backward compatibility, in the future hooks will be optional (if they are not implemented, due to the scheduler being created for the older Ruby version, the code which needs this hook will not fail, and will just behave in a blocking fashion).

It is also strongly recommended that the scheduler implements the fiber method, which is delegated to by Fiber.schedule.

Sample toy implementation of the scheduler can be found in Ruby’s code, in test/fiber/scheduler.rb

A base class for objects representing a C union

No documentation available

Socket::Option represents a socket option used by BasicSocket#getsockopt and BasicSocket#setsockopt. A socket option contains the socket family, protocol level, option name optname and option value data.

No documentation available
No documentation available
No documentation available
No documentation available

Map from option/keyword string to object with completion.

Raises when ambiguously completable string is encountered.

Search took: 7ms  ·  Total Results: 3178