summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorakira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-06 09:27:53 +0000
committerakira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-06 09:27:53 +0000
commitd5bf73ba6bb6a4767f87d63d9bcee4e938f1f141 (patch)
treee86cf913c540af1a01516465fcf91920c5f662ec /test/ruby
parent6d060b77b8955c82ca60050c9d911a12c0da0d55 (diff)
downloadruby-d5bf73ba6bb6a4767f87d63d9bcee4e938f1f141.tar.gz
ruby-d5bf73ba6bb6a4767f87d63d9bcee4e938f1f141.tar.xz
ruby-d5bf73ba6bb6a4767f87d63d9bcee4e938f1f141.zip
* test/ruby/test_proc.rb (TestProc::test_eq): added tests for
Proc#==. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_proc.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 99e2a4c7e..505048e6e 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -68,4 +68,21 @@ 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_equal(false, a == b)
+ assert_equal(false, a.call == b.call)
+
+ # [ruby-dev:22601]
+ a = lambda {|x| lambda {} }.call(1)
+ b = lambda {}
+ assert_equal(false, a == b)
+ end
end