D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Regexp
/
Filename :
try_convert-c.ri
back
Copy
U:RDoc::AnyMethod[iI"try_convert:ETI"Regexp::try_convert;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"(Returns +object+ if it is a regexp:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"(Regexp.try_convert(/re/) # => /re/ ;T:@format0o; ; [I"<Otherwise if +object+ responds to <tt>:to_regexp</tt>, ;TI"<calls <tt>object.to_regexp</tt> and returns the result.;T@o; ; [I"GReturns +nil+ if +object+ does not respond to <tt>:to_regexp</tt>.;T@o;; [I"'Regexp.try_convert('re') # => nil ;T; 0o; ; [I"KRaises an exception unless <tt>object.to_regexp</tt> returns a regexp.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"1Regexp.try_convert(object) -> regexp or nil ;T0[ I" (p1);T@FI"Regexp;TcRDoc::NormalClass00