diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-04 01:19:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-04 01:19:11 +0000 |
commit | e59d5667c7769ffbe77f50687cb4393ca9280b2b (patch) | |
tree | 3be4e57580f1ad886bb48661ffd1a7b1f309f5cb /test/ruby/envutil.rb | |
parent | 7ba2f1a9ddd7efc36aa3bfddbefc262b5fe6c990 (diff) | |
download | ruby-e59d5667c7769ffbe77f50687cb4393ca9280b2b.tar.gz |
dir.c: FNM_EXTGLOB
* dir.c (file_s_fnmatch): match with expanding braces if FNM_EXTGLOB
is set. [ruby-core:40037] [Feature #5422]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r-- | test/ruby/envutil.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 3e04f55c0c..780196a438 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -229,7 +229,7 @@ module Test AssertFile end - class << (AssertFile = Object.new) + class << (AssertFile = Struct.new(:message).new) include Assertions def assert_file_predicate(predicate, *args) if /\Anot_/ =~ predicate @@ -241,9 +241,14 @@ module Test mesg = "Expected file " << args.shift.inspect mesg << mu_pp(args) unless args.empty? mesg << "#{neg} to be #{predicate}" + mesg << " #{message}" if message assert(result, mesg) end alias method_missing assert_file_predicate + + def for(message) + clone.tap {|a| a.message = message} + end end end end |