summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-06 00:31:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-06 00:31:55 +0000
commit06b9094f96fb104ef1adf887edcb960a20fe2747 (patch)
tree7cce588ffd1b64372f62b11644fd934210cc7a43 /test/ruby
parent425696848891d9b83749d76ccf11ee4abf0092b5 (diff)
* proc.c (make_curry_proc): should propagate lambda-ness.
[ruby-core:24127] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_proc.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index e557f18..5a00fdb 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -181,6 +181,13 @@ class TestProc < Test::Unit::TestCase
b = b.call(2) { raise }
b = b.call(3) {|x| x + 4 }
assert_equal(9, b)
+
+ l = proc {}
+ assert_equal(false, l.lambda?)
+ assert_equal(false, l.curry.lambda?, '[ruby-core:24127]')
+ l = lambda {}
+ assert_equal(true, l.lambda?)
+ assert_equal(true, l.curry.lambda?, '[ruby-core:24127]')
end
def test_curry_ski_fib