| 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/BasicObject/ |
Upload File : |
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",instance variables and private methods.;To:RDoc::Markup::BlankLine o;
; [I"EWhen <code>instance_eval</code> is given a block, _obj_ is also ;TI",passed in as the block's only argument.;T@o;
; [I"GWhen <code>instance_eval</code> is given a +String+, the optional ;TI"Lsecond and third parameters supply a filename and starting line number ;TI"5that are used when reporting compilation errors.;T@o:RDoc::Markup::Verbatim; [I"class KlassWithSecret
;TI" def initialize
;TI" @secret = 99
;TI" end
;TI" private
;TI" def the_secret
;TI", "Ssssh! The secret is #{@secret}."
;TI" end
;TI" end
;TI"k = KlassWithSecret.new
;TI"1k.instance_eval { @secret } #=> 99
;TI"Ik.instance_eval { the_secret } #=> "Ssssh! The secret is 99."
;TI"2k.instance_eval {|obj| obj == self } #=> true;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 {|obj| block } -> obj
;T0[ I"(*args);T@+FI"BasicObject;TcRDoc::NormalClass00