summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 03:32:23 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 03:32:23 +0000
commit210f2cc7e80380dc05c64b3abda90198f9c86e79 (patch)
tree70f0cec1390d04805795426079a16dabe461a3ed /re.c
parente8ccf9f758a98348a3f35bb746b0d9b963dbb07b (diff)
downloadruby-210f2cc7e80380dc05c64b3abda90198f9c86e79.tar.gz
Regexp#===: Use `\A` and `\z` instead of `^` and `$`
[ci skip] ref https://github.com/rurema/doctree/pull/812 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/re.c b/re.c
index a78672b6bb..07a826daa7 100644
--- a/re.c
+++ b/re.c
@@ -3156,9 +3156,9 @@ rb_reg_match(VALUE re, VALUE str)
*
* a = "HELLO"
* case a
- * when /^[a-z]*$/; print "Lower case\n"
- * when /^[A-Z]*$/; print "Upper case\n"
- * else; print "Mixed case\n"
+ * when /\A[a-z]*\z/; print "Lower case\n"
+ * when /\A[A-Z]*\z/; print "Upper case\n"
+ * else; print "Mixed case\n"
* end
* #=> "Upper case"
*