diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_proc.rb | 17 |
2 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Fri Feb 6 18:26:00 2004 akira yamada <akira@ruby-lang.org> + + * test/ruby/test_proc.rb (TestProc::test_eq): added tests for + Proc#==. + Fri Feb 6 10:12:06 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/socket/socket.c (bsock_do_not_reverse_lookup): control reverse 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 |