| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Binding/ |
Upload File : |
U:RDoc::NormalClass[iI"Binding:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[ :
@fileI"lib/irb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"EObjects of class <code>Binding</code> encapsulate the execution ;TI"Jcontext at some particular place in the code and retain this context ;TI"Ifor future use. The variables, methods, value of <code>self</code>, ;TI"Iand possibly an iterator block that can be accessed in this context ;TI"<are all retained. Binding objects can be created using ;TI"I<code>Kernel#binding</code>, and are made available to the callback ;TI"+of <code>Kernel#set_trace_func</code>.;To:RDoc::Markup::BlankLine o;;[I"GThese binding objects can be passed as the second argument of the ;TI"J<code>Kernel#eval</code> method, establishing an environment for the ;TI"evaluation.;T@o:RDoc::Markup::Verbatim;[I"class Demo
;TI" def initialize(n)
;TI" @secret = n
;TI" end
;TI" def get_binding
;TI" binding
;TI" end
;TI" end
;TI"
;TI"k1 = Demo.new(99)
;TI"b1 = k1.get_binding
;TI"k2 = Demo.new(-3)
;TI"b2 = k2.get_binding
;TI"
;TI""eval("@secret", b1) #=> 99
;TI""eval("@secret", b2) #=> -3
;TI"#eval("@secret") #=> nil
;T:@format0o;;[I"4Binding objects have no class-specific methods.;T; I"proc.c;T;
0; 0;
0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[[I" eval;TI"proc.c;T[I"local_variable_defined?;T@J[I"local_variable_get;T@J[I"local_variable_set;T@J[I"local_variables;T@J[I"
receiver;T@J[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;
0[@
@5@5cRDoc::TopLevel