--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Returns a string containing the regular expression and its options (using the (?xxx:yyy) notation. This string can be fed back in to Regexp::new to a regular expression with the same semantics as the original. (However, Regexp#== may not return true when comparing the two, as the source of the regular expression itself may differ, as the example shows). Regexp#inspect produces a generally more readable version of rxp.
- !ruby/struct:SM::Flow::VERB
body: " r1 = /ab+c/ix #=> /ab+c/ix\n s1 = r1.to_s #=> "(?ix-m:ab+c)"\n r2 = Regexp.new(s1) #=> /(?ix-m:ab+c)/\n r1 == r2 #=> false\n r1.source #=> "ab+c"\n r2.source #=> "(?ix-m:ab+c)"\n"
full_name: Regexp#to_s
is_singleton: false
name: to_s
params: |
rxp.to_s => str
visibility: public