diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-16 03:32:23 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-16 03:32:23 +0000 |
commit | 210f2cc7e80380dc05c64b3abda90198f9c86e79 (patch) | |
tree | 70f0cec1390d04805795426079a16dabe461a3ed /re.c | |
parent | e8ccf9f758a98348a3f35bb746b0d9b963dbb07b (diff) | |
download | ruby-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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" * |