1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2018-04-08 07:31:46 +00:00
parent a38339d83d
commit 6ce7986668

2
dir.c
View file

@ -2653,7 +2653,7 @@ dir_s_aref(int argc, VALUE *argv, VALUE obj)
* *
* <code>*</code>:: * <code>*</code>::
* Matches any file. Can be restricted by other values in the glob. * 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>*</code>:: Matches all files
* <code>c*</code>:: Matches all files beginning with <code>c</code> * <code>c*</code>:: Matches all files beginning with <code>c</code>