summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-23 05:52:50 (GMT)
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-23 05:52:50 (GMT)
commit450b9bb6cb46bcc64b3d593e060c4d69df8d95d9 (patch)
treebe2c88adfb0709c6a868493d66f7b2726e29c17c /re.c
parent3193599d853dcedd9a1302a50d217e5512f959ee (diff)
* re.c (rb_reg_eqq): doc: #=== is not a synonym for #=~, added example
[ruby-dev:46746] [Bug #7571] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/re.c b/re.c
index 8fa1abc..2bda099 100644
--- a/re.c
+++ b/re.c
@@ -2760,7 +2760,7 @@ rb_reg_match(VALUE re, VALUE str)
* call-seq:
* rxp === str -> true or false
*
- * Case Equality---Synonym for <code>Regexp#=~</code> used in case statements.
+ * Case Equality---Used in case statements.
*
* a = "HELLO"
* case a
@@ -2768,10 +2768,13 @@ rb_reg_match(VALUE re, VALUE str)
* when /^[A-Z]*$/; print "Upper case\n"
* else; print "Mixed case\n"
* end
+ * #=> "Upper case"
*
- * <em>produces:</em>
+ * Following a regular expression literal with the #=== operator allows you to
+ * compare against a String.
*
- * Upper case
+ * /^[a-z]*$/ === "HELLO" #=> false
+ * /^[A-Z]*$/ === "HELLO" #=> true
*/
VALUE