Skip to content
Permalink
Browse files

Merge pull request #643 from topazproject/tim/Regexp#quote

Alias Regexp#quote to Regexp#escape
  • Loading branch information
alex committed Apr 20, 2013
2 parents 8ad6f07 + e1324bd commit 9da329e45b10f30f29d4c948f382b399e724e9ec
Showing with 1 addition and 2 deletions.
  1. +0 −2 spec/tags/core/regexp/quote_tags.txt
  2. +1 −0 topaz/objects/regexpobject.py
@@ -1,5 +1,3 @@
fails:Regexp.quote escapes any characters with special meaning in a regular expression
fails:Regexp.quote sets the encoding of the result to US-ASCII if there are only US-ASCII characters present in the input String
fails:Regexp.quote sets the encoding of the result to the encoding of the String if any non-US-ASCII characters are present in an input String with valid encoding
fails:Regexp.quote sets the encoding of the result to ASCII-8BIT if any non-US-ASCII characters are present in an input String with invalid encoding
fails:Regexp.quote works with symbols
@@ -229,6 +229,7 @@ def method_eqeqeq(self, space, s):
def method_casefoldp(self, space):
return space.newbool(bool(self.flags & regexp.IGNORE_CASE))

@classdef.singleton_method("quote", string="str")
@classdef.singleton_method("escape", string="str")
def method_escape(self, space, string):
result = []

0 comments on commit 9da329e

Please sign in to comment.
You can’t perform that action at this time.