D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Regexp
/
Filename :
to_s-i.ri
back
Copy
U:RDoc::AnyMethod[iI" to_s:ETI"Regexp#to_s;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"?Returns a string showing the options and string of +self+:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"r0 = /ab+c/ix ;TI"&s0 = r0.to_s # => "(?ix-m:ab+c)" ;T:@format0o; ; [I"CThe returned string may be used as an argument to Regexp.new, ;TI"#or as interpolated text for a ;TI"@{Regexp interpolation}[rdoc-ref:Regexp@Interpolation+Mode]:;T@o;; [I"-r1 = Regexp.new(s0) # => /(?ix-m:ab+c)/ ;TI"-r2 = /#{s0}/ # => /(?ix-m:ab+c)/ ;T; 0o; ; [I"3Note that +r1+ and +r2+ are not equal to +r0+ ;TI"2because their original strings are different:;T@o;; [I"r0 == r1 # => false ;TI"r0.source # => "ab+c" ;TI"#r1.source # => "(?ix-m:ab+c)" ;T; 0o; ; [I"Related: Regexp#inspect.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"to_s -> string ;T0[ I"();T@(FI"Regexp;TcRDoc::NormalClass00