[前][次][番号順一覧][スレッド一覧]

ruby-changes:46430

From: kazu <ko1@a...>
Date: Tue, 2 May 2017 20:26:34 +0900 (JST)
Subject: [ruby-changes:46430] kazu:r58541 (trunk): Use `\A` and `\z` instead of `^` and `$` [ci skip]

kazu	2017-05-02 20:26:28 +0900 (Tue, 02 May 2017)

  New Revision: 58541

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58541

  Log:
    Use `\A` and `\z` instead of `^` and `$` [ci skip]

  Modified files:
    trunk/sample/dir.rb
Index: sample/dir.rb
===================================================================
--- sample/dir.rb	(revision 58540)
+++ sample/dir.rb	(revision 58541)
@@ -3,7 +3,7 @@ https://github.com/ruby/ruby/blob/trunk/sample/dir.rb#L3
 dirp = Dir.open(".")
 for f in dirp
   case f
-  when /^\./, /~$/, /\.o/
+  when /\A\./, /~\z/, /\.o/
     # do not print
   else
     print f, "\n"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]