Add some operator methods to regular expression objects for catenation, union, etc.
--- SEC00086
--- ""
--- - methods: - visibility: public aref: M000140 name: + sourcecode: " <span class=\"ruby-comment cmt\"># File /Users/ged/source/ruby/Arrow/lib/arrow/monkeypatches.rb, line 30</span>\n\ 30: <span class=\"ruby-keyword kw\">def</span> <span class=\"ruby-operator\">+</span>( <span class=\"ruby-identifier\">other</span> ) \n\ 31: <span class=\"ruby-keyword kw\">return</span> <span class=\"ruby-keyword kw\">self</span>.<span class=\"ruby-identifier\">class</span>.<span class=\"ruby-identifier\">new</span>( <span class=\"ruby-keyword kw\">self</span>.<span class=\"ruby-identifier\">to_s</span> <span class=\"ruby-operator\">+</span> <span class=\"ruby-identifier\">other</span>.<span class=\"ruby-identifier\">to_s</span> )\n\ 32: <span class=\"ruby-keyword kw\">end</span>" m_desc: |- <p> Append the given <tt>other</tt> Regexp (or String) onto a copy of the receiving one and return it. </p> params: ( other ) - visibility: public aref: M000141 name: "|" sourcecode: " <span class=\"ruby-comment cmt\"># File /Users/ged/source/ruby/Arrow/lib/arrow/monkeypatches.rb, line 36</span>\n\ 36: <span class=\"ruby-keyword kw\">def</span> <span class=\"ruby-operator\">|</span>( <span class=\"ruby-identifier\">other</span> )\n\ 37: <span class=\"ruby-keyword kw\">return</span> <span class=\"ruby-constant\">Regexp</span>.<span class=\"ruby-identifier\">new</span>( <span class=\"ruby-value str\">"(?:%s|%s)"</span> <span class=\"ruby-operator\">%</span> [<span class=\"ruby-keyword kw\">self</span>.<span class=\"ruby-identifier\">to_s</span>, <span class=\"ruby-identifier\">other</span>.<span class=\"ruby-identifier\">to_s</span>] )\n\ 38: <span class=\"ruby-keyword kw\">end</span>" m_desc: |- <p> Create and return a new Regexp that is an alternation between the receiver and the <tt>other</tt> Regexp. </p> params: ( other ) category: Instance type: Public
---
Generated with the Darkfish Rdoc Generator.