summaryrefslogtreecommitdiff
path: root/test/ruby/test_lazy_enumerator.rb
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-16 10:35:34 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-16 10:35:34 +0000
commited57f299b243842e4e874189771d93340aaadddc (patch)
treee89e728d76c11de219fee5da1f7ae6f9fc99a2c6 /test/ruby/test_lazy_enumerator.rb
parent63f486f1dbc220aacad4a7fa4d47a370c6071d90 (diff)
* vm.c (vm_make_proc_from_block): should convert a Symbol to a Proc.
[ruby-core:72083] [Bug #11811] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_lazy_enumerator.rb')
-rw-r--r--test/ruby/test_lazy_enumerator.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index 29c6b3e855..5feddd5bde 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -532,4 +532,11 @@ EOS
assert_warning("") {le.drop(1).force}
assert_warning("") {le.drop_while{false}.force}
end
+
+ def test_symbol_chain
+ assert_equal(["1", "3"], [1, 2, 3].lazy.reject(&:even?).map(&:to_s).force)
+ assert_raise(NoMethodError) do
+ [1, 2, 3].lazy.map(&:undefined).map(&:to_s).force
+ end
+ end
end