From 210f2cc7e80380dc05c64b3abda90198f9c86e79 Mon Sep 17 00:00:00 2001 From: kazu Date: Thu, 16 Nov 2017 03:32:23 +0000 Subject: 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 --- re.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 're.c') 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" * -- cgit v1.2.3