aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
Commit message (Collapse)AuthorAgeFilesLines
* * 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-182-20/+50
| | | | | | | lambda using lambda parameter passing emulator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sample/test.rb, test/ruby/test_system.rb(valid_syntax?): keepnobu2007-08-181-1/+4
| | | | | | | comment lines first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (frame_func_id): return proper method ID.nobu2007-08-171-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_basicinstructions.rb: fix old tests.ko12007-08-171-3/+3
| | | | | | | | class variables should be inherited. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13080 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-164-277/+470
| | | | | | | | | | | | | | 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
* * hash.c (rb_hash_delete_key): delete the entry without calling block.nobu2007-08-151-0/+11
| | | | | | | | | | * hash.c (rb_hash_shift): should consider iter_lev too. * hash.c (delete_if_i): use rb_hash_delete_key() so that the block isn't called twice. [ruby-core:11556] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12936 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
* * enumerator.c (enumerator_next_p): should check correctly even whenmatz2007-08-081-0/+19
| | | | | | | | | | | | | | | | | e.next has not been called before. * enumerator.c (enumerator_next): raise StopIteration (name taken from Python) instead of IndexError. * enum.c (enum_zip): catch StopIteration exception. * enumerator.c (enumerator_with_index): return Enumerator if no block is given. * test/ruby/test_iterator.rb (TestIterator::test_enumerator): add test for enumerators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable renaming refined.akr2007-08-083-31/+25
| | | | 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
* added an assertion.tadf2007-08-051-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_f_sprintf): should not check positional number asnobu2007-08-021-0/+4
| | | | | | | width. [ruby-core:11838] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add assertions.akr2007-07-301-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_aref): check for Bignum index range.nobu2007-07-301-0/+7
| | | | | | | [ruby-dev:31271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refine tests for shift.akr2007-07-192-7/+56
| | | | | | | more tests for string to integer conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_lshift, rb_big_rshift): separated functionsnobu2007-07-191-0/+19
| | | | | | | | | | to get rid of infinite recursion. fixed calculation in edge cases. [ruby-dev:31244] * numeric.c (rb_fix_lshift, rb_fix_rshift): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_f_sprintf): more checks for format argument.nobu2007-07-151-0/+33
| | | | | | | | [ruby-core:11569], [ruby-core:11570], [ruby-core:11571], [ruby-core:11573] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refine failure messages.akr2007-07-151-6/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_cstr_to_inum): check leading non-digits.nobu2007-07-151-0/+12
| | | | | | | [ruby-core:11691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refined.akr2007-07-151-5/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (fix_pow): integer power calculation: 0**n => 0, matz2007-07-141-1/+1
| | | | | | | | | 1**n => 1, -1**n => 1 (n: even) / -1 (n: odd). * test/ruby/test_fixnum.rb (TestFixnum::test_pow): update test suite. pow(-3, 2^64) gives NaN when pow(3, 2^64) gives Inf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* more assertions.akr2007-07-141-2/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refined.akr2007-07-131-16/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check values around 16bit.akr2007-07-131-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* more tests.akr2007-07-131-0/+30
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add assertions using equations taken from Hacker's Delight.akr2007-07-131-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* new file.akr2007-07-131-0/+302
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* more tests.akr2007-07-131-0/+52
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check (-0x4000000000000000)/(-1) too.akr2007-07-131-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for [ruby-dev:31210].akr2007-07-131-0/+32
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sentence generator updated.akr2007-07-132-1/+195
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for [ruby-dev:31197].akr2007-07-131-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_max, range_min): return nil for empty set as well asnobu2007-07-131-0/+6
| | | | | | | 1.8 and Enumerable. [ruby-dev:31198] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests for [ruby-dev:31189] and [ruby-dev:31190].akr2007-07-122-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_iterator.rb: fix test to 1.9 spec.ko12007-07-061-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/sentgen.rb: new file.akr2007-07-062-0/+239
| | | | | | | | * test/ruby/test_assignment.rb: tests implemeneted using assignment generator and emulator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_basicinstructions.rb: remove an assertion usingko12007-07-052-2/+2
| | | | | | | | | unsupported hash literal (such as {1, 2}). * test/ruby/test_hash.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_pow): fix previous nubu's commit.usa2007-07-051-0/+26
| | | | | | | | * test/ruby/test_fixnum.rb: new test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12698 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
* * insn_send.ci: removed.ko12007-06-241-1/+1
| | | | | | | | | | | | | | | | * common.mk: ditto. * vm.c (vm_call_bmethod), isnsn.def: added. fix to use this function instead of using goto. * vm.c (vm_call_bmethod): renamed from th_invoke_bmethod(). * vm.c (vm_method_missing): renamed from eval_methdo_missing(). * vm_evalbody.ci: remove tmp_* variables. * insnhelper.h: add some macros. * insns.def: forbid zsuper from method defined by define_method(). * test/ruby/test_super.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c: exchange semantics of Hash#each and Hash#each_pair.ko12007-06-152-5/+14
| | | | | | | | | | 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
* * test/ruby/test_iterator.rb: remove debug code (GC.stress=true).ko12007-06-151-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (th_yield_setup_args): |v| should work as |v,|.ko12007-06-154-18/+19
| | | | | | | | | | | | | | 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
* * cont.c (rb_cont_call): forbid cross fiber continuation call.ko12007-06-151-24/+6
| | | | | | | | * test/ruby/test_fiber.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_beginendblock.rb: typo.usa2007-06-101-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_beginendblock.rb (test_should_propagate_signaled):nobu2007-06-101-10/+9
| | | | | | | get rid of invoking shell. [ruby-dev:30942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e