summaryrefslogtreecommitdiff
path: root/test/ruby/test_yield.rb
AgeCommit message (Collapse)Author
2017-03-19vm_args.c: arity check of lambdanobu
* vm_eval.c (rb_yield_lambda): new function which yields an array to a proc and splat to a lambda. mainly for Enumerable only. * vm_args.c (setup_parameters_complex): remove special lambda splatting for [Bug #9605]. [ruby-core:77065] [Bug #12705] * vm_insnhelper.c (vm_callee_setup_block_arg): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-27test/unit/assertions.rb: all_assertionsnobu
* test/lib/test/unit/assertions.rb (all_assertions): try all assertions and check if all passed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21* vm_insnhelper.c (vm_invoke_block): we should not expect ci->argc isko1
stable after invoking a block. [Bug #11451] * test/ruby/test_yield.rb: add a test. This test script is given by Alex Dowad. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02test_yield.rb: assert_all_sentencesnobu
* test/ruby/test_yield.rb (assert_all_sentences): test all sentences and report all results at the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13test_yield.rb: use temporary instancenobu
* test/ruby/test_yield.rb (test_with_enum): use temporary instance, do not define a method on the global class object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-13vm_insnhelper.c: relax arity checknobu
* vm.c (invoke_block_from_c): add splattable argument. * vm.c (vm_invoke_proc): disallow to splat when directly invoked. * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_callee_setup_arg): relax arity check of yielded lambda. [ruby-core:61340] [Bug #9605] * test/ruby/test_yield.rb (TestRubyYieldGen#emu_bind_params): no longer raise ArgumentError when splatting to lambda. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02* vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.naruse
The code is not useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-27suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25* test/ruby/test_proc.rb (test_proc_args_unleashed): test fornobu
[ruby-core:19485]. * test/ruby/test_yield.rb (test_block_args_unleashed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12* prelude.rb (require_relative): move require_relative frommatz
lib/require_relative.rb. [ruby-core:16356] * lib/require_relative.rb: removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-18use require_relative to require marshaltestlib and sentence.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28add test for enumerator.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28* insnhelper.ci (vm_invoke_block): should splat args.ko1
[ruby-dev:32392] * test/ruby/test_yield.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18sentence.rb documented.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18* test/ruby/test_yield.rb (TestYieldGen): relax array size checkakr
in nested parameters. [ruby-dev:31485] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18lambda yield emulator refactored.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18* test/ruby/test_yield.rb (TestYieldGen): add test for yielding toakr
lambda using lambda parameter passing emulator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16fix "&" handling in block parameter.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16* test/ruby/sentence.rb: Sentence class implementedakr
based on sentgen.rb * test/ruby/sentgen.rb: removed. * test/ruby/test_assignment.rb: use sentence.rb. * test/ruby/test_yield.rb: block parameter passing emulator implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-15TestRubyYieldGen#test_yield needs too long time.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-09update syntax (f_marg_list).akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-08variable renaming refined.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-06add test using sentgen.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-04revert variable renaming. [ruby-dev:31001]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-15* hash.c: exchange semantics of Hash#each and Hash#each_pair.ko1
pointed out by [ruby-dev:30997]. * test/ruby/test_iterator.rb: ditto. * test/ruby/test_yield.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-15* vm.c (th_yield_setup_args): |v| should work as |v,|.ko1
ex) def m;yield 1, 2; end; m{|v| p v} #=> 1 * parse.y: apply above change for "for" statement. * test/ruby/test_assignment.rb: ditto * test/ruby/test_basicinstructions.rb: ditto. * test/ruby/test_iterator.rb: ditto. * test/ruby/test_yield.rb: ditto. * compile.c (iseq_compile_each): fix debug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23* test/ruby/test_yield.rb: new test.aamine
* yarvtest/test_yield.rb: removed (moved to test_yield.rb). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e