Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
Kernel
/
//opt/alt/ruby21/share/ri/2.1.0/system/Kernel/trace_var-i.ri
U:RDoc::AnyMethod[iI"trace_var:ETI"Kernel#trace_var;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"HControls tracing of assignments to global variables. The parameter ;FI"D+symbol_ identifies the variable (as either a string name or a ;FI";symbol identifier). _cmd_ (which may be a string or a ;FI"?+Proc+ object) or block is executed whenever the variable ;FI":is assigned. The block or +Proc+ object receives the ;FI"3variable's new value as a parameter. Also see ;FI"&<code>Kernel::untrace_var</code>.;Fo:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"8trace_var :$_, proc {|v| puts "$_ is now '#{v}'" } ;TI"$_ = "hello" ;TI"$_ = ' there' ;T:@format0o; ; [I"<em>produces:</em>;F@o;; [I"$_ is now 'hello' ;TI"$_ is now ' there';T; 0: @fileI"eval.c;T:0@omit_headings_from_table_of_contents_below0I"[trace_var(symbol, cmd ) -> nil trace_var(symbol) {|val| block } -> nil ;F0[ I"(p1, p2 = v2);T@!FI"Kernel;TcRDoc::NormalModule00