diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-19 07:05:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-19 07:05:39 +0000 |
commit | 737482284441f90ffd8eb23e46649906894bd531 (patch) | |
tree | 8dc2ddcc0a0fd6f455e3ceb3349d14076ad7491a /spec/ruby | |
parent | bb414bd27ccef372f866bb1e57c80056f5cb9c84 (diff) | |
download | ruby-737482284441f90ffd8eb23e46649906894bd531.tar.gz |
dir.c: warning for NUL
* dir.c (rb_push_glob): warn NUL-separated glob patterns.
[Feature #14643]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/dir/shared/glob.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/ruby/core/dir/shared/glob.rb b/spec/ruby/core/dir/shared/glob.rb index 40973995c1..2fe22ac6c3 100644 --- a/spec/ruby/core/dir/shared/glob.rb +++ b/spec/ruby/core/dir/shared/glob.rb @@ -25,9 +25,11 @@ describe :dir_glob, shared: true do Dir.send(@method, obj).should == %w[file_one.ext] end - it "splits the string on \\0 if there is only one string given" do - Dir.send(@method, "file_o*\0file_t*").should == - %w!file_one.ext file_two.ext! + ruby_version_is ""..."2.6" do + it "splits the string on \\0 if there is only one string given" do + Dir.send(@method, "file_o*\0file_t*").should == + %w!file_one.ext file_two.ext! + end end it "matches non-dotfiles with '*'" do |