A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.wikibooks.org/wiki/Ruby_Programming/Reference/Objects/RubyVM below:

Ruby Programming/Reference/Objects/RubyVM - Wikibooks, open books for an open world

From Wikibooks, open books for an open world

RubyVM is (as noted) very VM dependent. Currently it is defined only for 1.9.x MRI.

Available on 1.9 only, this is basically a wrapper for yarv.

>> class A; def go; end; end
>> b = A.new.method(:go)
=> #
>> print RubyVM::InstructionSequence.disassemble b
== disasm: =======================
0000 trace 8 ( 1)
0002 putnil
0003 trace 16 ( 1)
0005 leave

I believe those trace methods represent calls to any Kernel#set_trace_func (or the C sibling to that ruby method).

Also note that with 1.9.2 you can pass in a proc.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4