aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-20 14:23:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-20 14:23:16 +0000
commit89130aa8e17642a8b60c02030610e12124f25721 (patch)
treeda73a9f62c0a7b45c8bc80aa474639368cab2c7b /test
parentc7caeda5ed20938974ccb7dd6bfddad1e65cb18e (diff)
downloadruby-89130aa8e17642a8b60c02030610e12124f25721.tar.gz
* dir.c (bracket): get rid of scanning at the end of the pattern
string, not to raise an exception while globbing command line. [ruby-core:32478] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 45732d627e..459e316016 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -461,4 +461,15 @@ class TestRubyOptions < Test::Unit::TestCase
}
assert_equal("\"zzz\\n\"\n", result, '[ruby-core:30910]')
end
+
+ def test_unmatching_glob
+ bug3851 = '[ruby-core:32478]'
+ a = "a[foo"
+ Dir.mktmpdir do |dir|
+ open(File.join(dir, a), "w") {|f| f.puts("p 42")}
+ assert_in_out_err(["-C", dir, a], "", ["42"], [], bug3851)
+ File.unlink(File.join(dir, a))
+ assert_in_out_err(["-C", dir, a], "", [], /LoadError/, bug3851)
+ end
+ end
end