U:RDoc::AnyMethod[iI"of:ETI"$RubyVM::InstructionSequence::of;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"JReturns the instruction sequence containing the given proc or method.;To:RDoc::Markup::BlankLineo; ; [I"For example, using irb:;T@o:RDoc::Markup::Verbatim; [I"# a proc ;TI" > p = proc { num = 1 + 2 } ;TI")> RubyVM::InstructionSequence.of(p) ;TI"D> #=> ;TI" ;TI"# for a method ;TI"#> def foo(bar); puts bar; end ;TI"4> RubyVM::InstructionSequence.of(method(:foo)) ;TI"3> #=> ;T: @format0o; ; [I"Using ::compile_file:;T@o; ; [I"# /tmp/iseq_of.rb ;TI"def hello ;TI" puts "hello, world" ;TI" end ;TI" ;TI"/$a_global_proc = proc { str = 'a' + 'b' } ;TI" ;TI"# in irb ;TI"!> require '/tmp/iseq_of.rb' ;TI" ;TI"# first the method hello ;TI"6> RubyVM::InstructionSequence.of(method(:hello)) ;TI";> #=> # ;TI" ;TI"# then the global proc ;TI"6> RubyVM::InstructionSequence.of($a_global_proc) ;TI":> #=> #;T; 0: @fileI" iseq.c;T:0@omit_headings_from_table_of_contents_below000[I" (p1);T@3FI"InstructionSequence;TcRDoc::NormalClass00