summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_file.rb6
-rw-r--r--test/ruby/test_proc.rb20
2 files changed, 26 insertions, 0 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index b35a2661c9..44c315b799 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -43,4 +43,10 @@ class TestFile < Test::Unit::TestCase
alias open_file_rw open_file
include TestEOF::Seek
+
+ def test_fnmatch
+ # from [ruby-dev:22815] and [ruby-dev:22819]
+ assert(true, File.fnmatch('\[1\]' , '[1]'))
+ assert(true, File.fnmatch('*?', 'a'))
+ end
end
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 99e2a4c7e9..23b84ed20f 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -68,4 +68,24 @@ class TestProc < Test::Unit::TestCase
assert_arity(-1) {|*x|}
assert_arity(-1) {|*|}
end
+
+ # [ruby-dev:22592]
+ def m(x)
+ lambda { x }
+ end
+ def test_eq
+ # [ruby-dev:22592]
+ a = m(1)
+ b = m(2)
+ assert_not_equal(a, b)
+ assert_not_equal(a.call, b.call)
+
+ # [ruby-dev:22599]
+ assert_not_equal(proc {||}, proc {|x,y|})
+
+ # [ruby-dev:22601]
+ a = lambda {|x| lambda {} }.call(1)
+ b = lambda {}
+ assert_not_equal(a, b)
+ end
end