aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_yield.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | 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
* test/unit/assertions.rb: all_assertionsnobu2015-09-271-9/+5
| | | | | | | * 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
* * vm_insnhelper.c (vm_invoke_block): we should not expect ci->argc isko12015-08-211-0/+24
| | | | | | | | | | 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
* test_yield.rb: assert_all_sentencesnobu2015-01-021-7/+18
| | | | | | | * 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
* test_yield.rb: use temporary instancenobu2014-09-131-1/+1
| | | | | | | * 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
* vm_insnhelper.c: relax arity checknobu2014-03-131-1/+1
| | | | | | | | | | | * 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
* * vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.naruse2013-06-021-0/+11
| | | | | | The code is not useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warnings.akr2010-01-271-8/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_proc.rb (test_proc_args_unleashed): test fornobu2008-10-251-0/+11
| | | | | | | | | [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
* * prelude.rb (require_relative): move require_relative frommatz2008-04-121-1/+0
| | | | | | | | 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
* use require_relative to require marshaltestlib and sentence.akr2008-02-181-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for enumerator.akr2007-11-281-1/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci (vm_invoke_block): should splat args.ko12007-11-281-0/+8
| | | | | | | | | [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
* sentence.rb documented.akr2007-08-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_yield.rb (TestYieldGen): relax array size checkakr2007-08-181-7/+7
| | | | | | | | in nested parameters. [ruby-dev:31485] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lambda yield emulator refactored.akr2007-08-181-7/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_yield.rb (TestYieldGen): add test for yielding toakr2007-08-181-19/+50
| | | | | | | lambda using lambda parameter passing emulator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix "&" handling in block parameter.akr2007-08-161-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/sentence.rb: Sentence class implementedakr2007-08-161-10/+124
| | | | | | | | | | | | | | 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
* TestRubyYieldGen#test_yield needs too long time.akr2007-08-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update syntax (f_marg_list).akr2007-08-091-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable renaming refined.akr2007-08-081-14/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test using sentgen.akr2007-08-061-0/+132
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert variable renaming. [ruby-dev:31001]akr2007-07-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c: exchange semantics of Hash#each and Hash#each_pair.ko12007-06-151-1/+1
| | | | | | | | | | 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
* * vm.c (th_yield_setup_args): |v| should work as |v,|.ko12007-06-151-2/+2
| | | | | | | | | | | | | | 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
* * test/ruby/test_yield.rb: new test.aamine2007-02-231-0/+67
* 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