summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-26 17:22:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-26 17:22:26 +0000
commit57a285edf74b7b304fc00991b1b4fd5e2d62a703 (patch)
tree3b804e54858598bb1e1412c8aaee4063d32211ac /test/ruby
parent216cb37910a0e5de7e71c22236d4aa3fb3d745c6 (diff)
downloadruby-57a285edf74b7b304fc00991b1b4fd5e2d62a703.tar.gz
ruby-57a285edf74b7b304fc00991b1b4fd5e2d62a703.tar.xz
ruby-57a285edf74b7b304fc00991b1b4fd5e2d62a703.zip
* io.c (rb_io_each_byte): caused infinite loop. [ruby-dev:31652]
* io.c (rb_io_getc): should return nil at EOF, not EOFError. * lib/delegate.rb (SimpleDelegator::__setobj__): use raise argument to specify backtrace. * test/ruby/test_fnmatch.rb (TestFnmatch::bracket_test): String#include? no longer works for Fixnum. use #chr. [ruby-dev:31652] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_fnmatch.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_fnmatch.rb b/test/ruby/test_fnmatch.rb
index 7e378b911..aad848d09 100644
--- a/test/ruby/test_fnmatch.rb
+++ b/test/ruby/test_fnmatch.rb
@@ -4,9 +4,9 @@ class TestFnmatch < Test::Unit::TestCase
def bracket_test(s, t) # `s' should start with neither '!' nor '^'
0x21.upto(0x7E) do |i|
- assert_equal(t.include?(i), File.fnmatch("[#{s}]", i.chr, File::FNM_DOTMATCH))
- assert_equal(t.include?(i), !File.fnmatch("[^#{s}]", i.chr, File::FNM_DOTMATCH))
- assert_equal(t.include?(i), !File.fnmatch("[!#{s}]", i.chr, File::FNM_DOTMATCH))
+ assert_equal(t.include?(i.chr), File.fnmatch("[#{s}]", i.chr, File::FNM_DOTMATCH))
+ assert_equal(t.include?(i.chr), !File.fnmatch("[^#{s}]", i.chr, File::FNM_DOTMATCH))
+ assert_equal(t.include?(i.chr), !File.fnmatch("[!#{s}]", i.chr, File::FNM_DOTMATCH))
end
end
def test_fnmatch