summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--re.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f975b208f7..730d9044be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Dec 23 14:52:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * re.c (rb_reg_eqq): doc: #=== is not a synonym for #=~, added example
+ [ruby-dev:46746] [Bug #7571]
+
Sun Dec 23 14:35:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (BLOCKING_REGION): if fail_if_interrupted is false ignore
diff --git a/re.c b/re.c
index 8fa1abc0e6..2bda09951d 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