ruby-changes:50908
From: kazu <ko1@a...>
Date: Sun, 8 Apr 2018 16:31:52 +0900 (JST)
Subject: [ruby-changes:50908] kazu:r63115 (trunk): [DOC] `*` in glob matches `\n` too [ci skip]
kazu 2018-04-08 16:31:46 +0900 (Sun, 08 Apr 2018) New Revision: 63115 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63115 Log: [DOC] `*` in glob matches `\n` too [ci skip] ``` File.fnmatch("a*b", "a\nb") # => true /\Aa.*b\z/x.match?("a\nb") # => false /\Aa.*b\z/mx.match?("a\nb") # => true ``` Modified files: trunk/dir.c Index: dir.c =================================================================== --- dir.c (revision 63114) +++ dir.c (revision 63115) @@ -2653,7 +2653,7 @@ dir_s_aref(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/dir.c#L2653 * * <code>*</code>:: * Matches any file. Can be restricted by other values in the glob. - * Equivalent to <code>/ .* /x</code> in regexp. + * Equivalent to <code>/ .* /mx</code> in regexp. * * <code>*</code>:: Matches all files * <code>c*</code>:: Matches all files beginning with <code>c</code> -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/