In Files
- ast.c
- vm.c
Parent
Namespace
- MODULE RubyVM::AbstractSyntaxTree
- MODULE RubyVM::MJIT
- CLASS RubyVM::InstructionSequence
Methods
Files
- grammar.en.rdoc
- test.ja.rdoc
- contributing.rdoc
- contributors.rdoc
- dtrace_probes.rdoc
- extension.ja.rdoc
- extension.rdoc
- globals.rdoc
- keywords.rdoc
- maintainers.rdoc
- marshal.rdoc
- regexp.rdoc
- security.rdoc
- signals.rdoc
- standard_library.rdoc
- syntax.rdoc
- assignment.rdoc
- calling_methods.rdoc
- control_expressions.rdoc
- exceptions.rdoc
- literals.rdoc
- methods.rdoc
- miscellaneous.rdoc
- modules_and_classes.rdoc
- precedence.rdoc
- refinements.rdoc
- README.ja.rdoc
- README.rdoc
Class/Module Index ![show/hide quicksearch [+]](./images/find.png)
- ARGF
- ArgumentError
- Array
- BasicObject
- Binding
- Class
- ClosedQueueError
- Comparable
- Complex
- ConditionVariable
- Continuation
- Data
- Dir
- ENV
- EOFError
- Encoding
- Encoding::CompatibilityError
- Encoding::Converter
- Encoding::ConverterNotFoundError
- Encoding::InvalidByteSequenceError
- Encoding::UndefinedConversionError
- EncodingError
- Enumerable
- Enumerator
- Enumerator::ArithmeticSequence
- Enumerator::Chain
- Enumerator::Generator
- Enumerator::Lazy
- Enumerator::Yielder
- Errno
- Exception
- FalseClass
- Fiber
- FiberError
- File
- File::Constants
- File::Stat
- FileTest
- Float
- FloatDomainError
- FrozenError
- GC
- GC::Profiler
- Hash
- IO
- IO::EAGAINWaitReadable
- IO::EAGAINWaitWritable
- IO::EINPROGRESSWaitReadable
- IO::EINPROGRESSWaitWritable
- IO::EWOULDBLOCKWaitReadable
- IO::EWOULDBLOCKWaitWritable
- IO::WaitReadable
- IO::WaitWritable
- IOError
- IndexError
- Integer
- Interrupt
- Kernel
- KeyError
- LoadError
- LocalJumpError
- Marshal
- MatchData
- Math
- Math::DomainError
- Method
- Module
- Mutex
- NameError
- NilClass
- NoMemoryError
- NoMethodError
- NotImplementedError
- Numeric
- Object
- ObjectSpace
- ObjectSpace::WeakMap
- Proc
- Process
- Process::GID
- Process::Status
- Process::Sys
- Process::UID
- Queue
- Random
- Random::Formatter
- Range
- RangeError
- Rational
- Regexp
- RegexpError
- RubyVM
- RubyVM::AbstractSyntaxTree
- RubyVM::AbstractSyntaxTree::Node
- RubyVM::InstructionSequence
- RubyVM::MJIT
- RuntimeError
- ScriptError
- SecurityError
- Signal
- SignalException
- SizedQueue
- StandardError
- StopIteration
- String
- Struct
- Symbol
- SyntaxError
- SystemCallError
- SystemExit
- SystemStackError
- Thread
- Thread::Backtrace::Location
- ThreadError
- ThreadGroup
- Time
- TracePoint
- TrueClass
- TypeError
- UnboundMethod
- UncaughtThrowError
- UnicodeNormalize
- Warning
- ZeroDivisionError
- fatal
- unknown
RubyVM
The RubyVM module provides some access to Ruby internals. This module is for very limited purposes, such as debugging, prototyping, and research. Normal users must not use it.
Constants
- DEFAULT_PARAMS
-
DEFAULT_PARAMS This constant variable shows VM's default parameters. Note that changing these values does not affect VM execution. Specification is not stable and you should not depend on this value. Of course, this constant is MRI specific.
- INSTRUCTION_NAMES
- OPTS
-
OPTS, which shows vm build options
Public Class Methods
Returns a Hash containing implementation-dependent counters inside the VM.
This hash includes information about method/constant cache serials:
{ :global_method_state=>251, :global_constant_state=>481, :class_serial=>9029 }
The contents of the hash are implementation specific and may be changed in the future.
This method is only expected to work on C Ruby.
static VALUE vm_stat(int argc, VALUE *argv, VALUE self) { static VALUE sym_global_method_state, sym_global_constant_state, sym_class_serial; VALUE arg = Qnil; VALUE hash = Qnil, key = Qnil; if (rb_check_arity(argc, 0, 1) == 1) { arg = argv[0]; if (SYMBOL_P(arg)) key = arg; else if (RB_TYPE_P(arg, T_HASH)) hash = arg; else rb_raise(rb_eTypeError, "non-hash or symbol given"); } else { hash = rb_hash_new(); } if (sym_global_method_state == 0) { #define S(s) sym_##s = ID2SYM(rb_intern_const(#s)) S(global_method_state); S(global_constant_state); S(class_serial); #undef S } #define SET(name, attr) \ if (key == sym_##name) \ return SERIALT2NUM(attr); \ else if (hash != Qnil) \ rb_hash_aset(hash, sym_##name, SERIALT2NUM(attr)); SET(global_method_state, ruby_vm_global_method_state); SET(global_constant_state, ruby_vm_global_constant_state); SET(class_serial, ruby_vm_class_serial); #undef SET if (!NIL_P(key)) { /* matched key should return above */ rb_raise(rb_eArgError, "unknown key: %"PRIsVALUE, rb_sym2str(key)); } return hash; }
This page was generated for Ruby
Ruby-doc.org is a service of James Britt and Neurogami, an erratic source of art, music, and technology.
Generated with Ruby-doc Rdoc Generator 0.44.0.