summaryrefslogtreecommitdiff
path: root/test/ruby/test_proc.rb
AgeCommit message (Collapse)Author
2017-03-08proc.c: preserve class name encoding in Proc#to_snobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20test_proc.rb: improve curry testsnobu
* test/ruby/test_proc.rb (test_curry): split. * test/ruby/test_proc.rb (test_curry_passed_block): simplify the assertion. * test/ruby/test_proc.rb (test_curry_with_trace): run all curry tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-08test_proc.rb: test_lambda?nobu
* test/ruby/test_proc.rb (test_lambda?): lambda-ness should be preserved across proc, lambda, and Proc.new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-19test/ruby: suppress parser warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-12fix test to follow r53503naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16* vm.c: fix mark miss for proc given as passed block.ko1
[Bug #11750] * vm.c (vm_make_proc_from_block): should return a Proc object if block is given. Previous implementation returns a Proc object only when corresponding Proc object is not available. * vm.c (vm_make_env_each): ditto. * test/ruby/test_proc.rb: add a test for this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53144 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-03-29test_proc.rb: test_curry_bindingnobu
* test/ruby/test_proc.rb (test_curry_binding): rename test_binding2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-15* test/ruby/test_proc.rb: Fix typo signle -> singlegogotanaka
[fix GH-852][ci skip] Patch by @hanachin git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16proc.c: fix method proc binding locationnobu
* proc.c (proc_binding): use the original iseq on a binding from proc from method object to get the location. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-27proc.c: fix method proc binding receivernobu
* proc.c (method_proc): the receiver of binding from method should be same as the receiver of the method. [ruby-core:65917] [Bug #10432] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01vm.c: rb_vm_env_local_variablesnobu
* vm.c (rb_vm_env_local_variables): returns array of local variable name symbols in the environment by envval. * proc.c (bind_local_variables): use rb_vm_env_local_variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01proc.c: Binding#receivernobu
* proc.c (bind_receiver): new method to return the bound receiver of the binding object. [ruby-dev:47613] [Feature #8779] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01proc.c: fix infinite loopnobu
* proc.c (bind_local_variables): update env from envval for each iterations. [ruby-dev:48351] [Bug #10001] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01test_proc.rb: test_local_variablesnobu
* test/ruby/test_proc.rb (test_local_variables): missing test for Binding#local_variables. [Feature #8773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01test_proc.rb: test_local_variables_in_other_contextnobu
* test/ruby/test_proc.rb (test_local_variables_in_other_context): move from test_variable.rb, this is a test for the method of Binding, not of Kernel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26test/ruby: fix leaked threadsnobu
* test/thread/test_{backtrace,beginendblock,proc,threadgroup}.rb: join work threads not to leak threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25* proc.c: Having any mandatory keyword argument increases min arity [#9299]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25* proc.c: Having optional keyword arguments makes maximum arity +1, not ↵marcandre
unlimited [#8072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25iseq.c: fix parameter of unnamed rest keywords argumentnobu
* iseq.c (rb_iseq_parameters): push argument type symbol only for unnamed rest keywords argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25proc.c: fix arity of rest keywords argumentnobu
* proc.c (rb_iseq_min_max_arity): maximum argument is unlimited if having rest keywords argument. [ruby-core:53298] [Bug #8072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25test_method.rb, test_proc.rb: suppress warningsnobu
* test/ruby/test_method.rb: suppress warnings in verbose mode. * test/ruby/test_proc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20Fix typo in testsa_matsuda
* test/ruby/test_proc.rb: s/overriden/overridden/ * test/ruby/test_refinement.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13test/ruby: better assertionsnobu
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09* proc.c: add Binding#local_variable_get/set/defined?ko1
to access local variables which a binding contains. Most part of implementation by nobu. * test/ruby/test_proc.rb: add a tests for above. * vm.c, vm_core.h (rb_binding_add_dynavars): add a new function to add a new environment to create space for new local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* test/ruby/test_proc.rb (TestProc#test_block_given_method_to_proc):ktsj
run test for r41359. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* include/ruby/intern.h, proc.c (rb_method_call_with_block):ktsj
new function to invoke a Method object with a block passed as an argument. * proc.c (bmcall): use the above function to avoid a block sharing. [ruby-core:54626] [Bug #8341] * test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls): run related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17skip new tests until fixednobu
* test/ruby/test_proc.rb, test/ruby/test_symbol.rb: skip new tests until fixed, for the time being. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17test/ruby/test_proc.rb: tests for [Bug #8341]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-30proc.c: frozen core methodsnobu
* proc.c (mproc, mlambda): use frozen core methods instead of plain global methods, so that methods cannot be overridden. [ruby-core:54687] [Bug #8345] * vm.c (Init_VM): define proc and lambda on the frozen core object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-01* proc.c (proc_curry): Fix arity check [Bug #5747]marcandre
* test/ruby/test_proc.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-01* proc.c: Add {*}_min_max_arity and refactor.marcandre
[Bug #7765] * test/ruby/test_proc.rb: Fix wrong test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28vm_insnhelper.c: no splat single opt argnobu
* vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to single optional parameter unchanged without splatting. [Bug #7621] [ruby-dev:46801] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-19Suppress warningsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28* proc.c: remove Proc#== and Proc#eql?.ko1
Proc objects compared with thier object ids. * test/ruby/test_proc.rb: remove related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-23Add test for instance_exec receiving a curried proc.tenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-17Add tests for r36415.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-16Revert of r36411, as does not distinguish proc from lambdamarcandre
* proc.c (rb_proc_arity): Fix Proc#arity in case of optional arguments [bug #5694] [rubyspec:b8b259] [rubyspec:184c8100f] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-16Revert r33924.marcandre
* proc.c (rb_proc_arity): Fix Proc#arity in case of optional arguments [bug #5694] [rubyspec:b8b259] [rubyspec:184c8100f] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23* parse.y (primary): remove wrong "fixpos" that caused incorrectmame
source_location of blocks. [ruby-core:42232] [Bug #5930] * test/ruby/test_proc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-12* vm_insnhelper.c (vm_yield_setup_block_args): splat singlenobu
argument if optinal arguments are defined not only mandatory or post arguments. [ruby-core:41557] [Bug #5730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-10* test/ruby/test_proc.rb (TestProc): renamed argument tests.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-05* vm_eval.c (check_funcall): try respond_to? first if redefined.nobu
[Bug #5158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-24* string.c (sym_call), vm.c (invoke_block_from_c),nobu
vm_insnhelper.c (vm_yield_with_cfunc): pass given block. [ruby-core:32075] * vm_eval.c (rb_funcall_passing_block): new function to call method with passing given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29* vm.c (rb_thread_method_id_and_class): curried proc has nonobu
method. [ruby-core:31871] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-08* test/ruby/test_proc.rb (test_parameters): require is no longer built-in.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29* test/ruby: fixed nonsense assertions.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22add a test.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-14avoid method redefinition.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e