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
/
BasicObject
/
//opt/alt/ruby21/share/ri/2.1.0/system/BasicObject/instance_eval-i.ri
U:RDoc::AnyMethod[iI"instance_eval:ETI"BasicObject#instance_eval;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"IEvaluates a string containing Ruby source code, or the given block, ;TI"Ewithin the context of the receiver (_obj_). In order to set the ;TI"8context, the variable +self+ is set to _obj_ while ;TI">the code is executing, giving the code access to _obj_'s ;TI"Finstance variables. In the version of <code>instance_eval</code> ;TI":that takes a +String+, the optional second and third ;TI"Iparameters supply a filename and starting line number that are used ;TI"'when reporting compilation errors.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"class KlassWithSecret ;TI" def initialize ;TI" @secret = 99 ;TI" end ;TI" end ;TI"k = KlassWithSecret.new ;TI")k.instance_eval { @secret } #=> 99;T:@format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"}obj.instance_eval(string [, filename [, lineno]] ) -> obj obj.instance_eval {| | block } -> obj ;T0[ I"(*args);T@FI"BasicObject;TcRDoc::NormalClass00