summaryrefslogtreecommitdiffstats
path: root/test/ruby
Commit message (Collapse)AuthorAgeFilesLines
...
* add more roundtrip tests.akr2007-11-251-0/+44
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for printf format %x, %o and %b.akr2007-11-241-0/+79
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_knownbug.rb: move solved tests.ko12007-11-232-0/+11
| | | | | | | | | | * bootstraptest/test_io.rb, test_marshal.rb, test_objectspace.rb: ditto. * test/ruby/test_integer.rb, test_regexp.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (REG_CASESTATE): unused macro removed.akr2007-11-231-0/+201
| | | | | | | | | | | | (rb_reg_prepare_re): check encoding difference. (rb_reg_initialize): check 8bit byte. * parse.y (parser_tokadd_escape): fix has8bit. [ruby-dev:32113] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (defined_expr): defined(method(x)) dumped core. amatz2007-11-231-2/+11
| | | | | | patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32335] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check struct timespec, clock_gettime, utimensat,akr2007-11-191-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct stat.st_atim, struct stat.st_atimespec, struct stat.st_atimensec, struct stat.st_mtim, struct stat.st_mtimespec, struct stat.st_mtimensec, struct stat.st_ctim, struct stat.st_ctimespec, struct stat.st_ctimensec. * include/ruby/missing.h: provide struct timespec if not available. * time.c: support nanosecond-resolution using struct timespec. * include/ruby/intern.h: provide rb_time_nano_new. * file.c (utime_internal): use utimensat if available. (rb_file_s_utime): refactored. (rb_f_test): use stat_atime, stat_mtime, stat_ctime. (rb_stat_cmp): check tv_nsec. (stat_atimespec): new function. (stat_atime): ditto. (stat_mtimespec): ditto. (stat_mtime): ditto. (stat_ctimespec): ditto. (stat_ctime): ditto. (rb_stat_atime): use stat_atime. (rb_file_s_atime): ditto. (rb_file_atime): ditto. (rb_stat_mtime): use stat_mtime. (rb_file_s_mtime): ditto. (rb_file_mtime): ditto. (rb_file_ctime): use stat_ctime. (rb_file_s_ctime): ditto. (rb_stat_ctime): ditto. * variable.c (rb_copy_generic_ivar): clear clone's instance variables if obj has no instance variable. * marshal.c (w_object): dump instance variables of generated string for TYPE_USERDEF, even if original object has instance variables. * lib/time.rb (Time#xmlschema): use nsec instead of usec. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_minus): fix Time.at(2**60+1) - Time.at(2**60).akr2007-11-181-0/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use ML ref. for assertion message.akr2007-11-1813-71/+58
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check class.akr2007-11-171-4/+56
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * set eol-style.nobu2007-11-161-47/+47
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_settracefunc.rb: fixed tests for set_trace_func.shugo2007-11-121-125/+160
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci (vm_call_method): pass mn->nd_clss toshugo2007-11-111-1/+1
| | | | | | | | | vm_call_cfunc() instead of klass. * vm.c (rb_thread_method_id_and_klass): traverse parent_iseq. * thread.c (call_trace_proc): use rb_thread_method_id_and_klass(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_iterator.rb (TestIterator::IterTest::each):matz2007-11-091-6/+3
| | | | | | | | | #each_pair is now alias to #each. [ruby-dev:32192] * test/ruby/test_iterator.rb (TestIterator::test_assoc_yield): ditto git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_basicinstructions.rb: updated for new classmatz2007-11-091-6/+6
| | | | | | | | | | | | | | | | | behavior. [ruby-dev:32192] * encoding.c (enc_name): Encoding should not rely on ENCODING in the FL_USERS flags. * encoding.c (rb_enc_from_encoding): do not call rb_enc_associate for encoding itself. * encoding.c (enc_register_at): ditto. * marshal.c (r_ivar): do not set real instance variable for encoding data associated. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: patch, based on Nobu's, work to support \u escapesdavidflanagan2007-11-072-0/+265
| | | | | | | | | | also modifications for better coderange detection * test/ruby/test_unicode_escapes.rb: test cases * test/ruby/test_mixed_unicode_escapes.rb: mixed encoding test cases git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_send): allow send/__send__ to call methods of allmatz2007-11-044-5/+5
| | | | | | | | | | visibility again. we no longer provide __send, __send!. * eval.c (rb_invoke_method): new method to honor private visibility. if it's invoked in a function call style, it calls private methods as well (previous 1.9 send behavior). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* specify prefix for Dir.mktmpdir.akr2007-10-242-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Dir.mktmpdir.akr2007-10-242-21/+21
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_bytes0): check if source has enough data.nobu2007-10-151-0/+20
| | | | | | | [ruby-dev:32054] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_obj_encoding): rdoc update. a patch from Davidnobu2007-10-141-0/+28
| | | | | | | | | | | | | | | | Flanagan <david AT davidflanagan.com>. [ruby-core:12664] * encoding.c (enc_dump, enc_load): marshaling feature. a patch from David Flanagan. [ruby-core:12665] * encoding.c (Init_Encoding): undefine allocator of Encoding. [ruby-core:12665], [ruby-core:12666] * test/ruby/test_encoding.rb: tests for Encoding from David Flanagan [ruby-core:12665] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_cvar_set): check whether class variable ismatz2007-10-031-7/+7
| | | | | | | | | | defined in superclasses. root classes have higher priority. removes lower class variable entry from IV_TBL (if it's defined in classes, not modules). * variable.c (rb_cvar_get): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_product): generalized product, now takesmatz2007-10-021-0/+6
| | | | | | | arbitrary number of arrays. a patch from David Flanagan <david AT davidflanagan.com>. [ruby-core:12346] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_permutation): implementation contributed frommatz2007-10-011-8/+16
| | | | | | | | | David Flanagan. [ruby-core:12344] * array.c (rb_ary_combination): RDoc update to clarify. a patch from David Flanagan. [ruby-core:12344] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_combination): revisit #combination behavior.matz2007-10-011-2/+2
| | | | | | suggested by David Flanagan. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_combination): new method to give all combinationmatz2007-09-291-0/+22
| | | | | | | | | | | | | of elements from an array. [ruby-list:42671] * array.c (rb_ary_product): a new method to get all combinations of elements from two arrays. can be extended to combinations of n-arrays, e.g. a.product(b,c,d). anyone volunteer? * array.c (rb_ary_permutation): empty function body to calculate permutations of array elements. need volunteer. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: Thread local storage should be fiber local.ko12007-09-281-0/+29
| | | | | | | | | * bootstraptest/test_knownbug.rb, test/ruby/test_fiber.rb: move a fixed test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refine previous change.akr2007-09-282-87/+91
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't generate temporary files under current directory.akr2007-09-283-21/+27
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_knownbug.rb: move fixed tests.ko12007-09-261-1/+1
| | | | | | | | | * bootstraptest/test_method.rb: ditto. * test/ruby/test_io.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb: tests which cause SEGV should not beko12007-09-141-1/+2
| | | | | | | | | added. * bootstraptest/test_knownbug.rb: add above test to known bug. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_dumper): make uninitialized range dumpable.akr2007-09-101-0/+7
| | | | | | | (range_loader): make uninitialized range loadable. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c: represent initialized state using EXCL instead of FL_USER3.akr2007-09-101-0/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for [ruby-dev:31650] and [ruby-dev:31659].akr2007-09-081-0/+18
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for [ruby-dev:31759].akr2007-09-071-4/+12
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_fiber.rb (TestFiber::test_throw): uncaught throwmatz2007-09-071-1/+1
| | | | | | now raise ArgumentError exception. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test for [ruby-dev:31709].akr2007-09-021-0/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (struct RBignum): embed digits in RBignum forakr2007-09-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | small bignums. * bignum.c: RBignum embeded digits implemented. * include/ruby/intern.h: declare rb_big_resize. * gc.c: don't free embedded digits. * numeric.c: replace direct bignum field accessor by abstract field accessor such as RBIGNUM(val)->sign to RBIGNUM_SIGN(val). * sprintf.c: ditto. * compar.c: ditto. * marshal.c: ditto. * random.c: ditto. * .gdbinit: support embedded small bignums. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_string.rb (test_splice!): tests for [ruby-dev:31665].nobu2007-08-281-0/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c: fix Mutex to be interruptable lock.ko12007-08-271-0/+24
| | | | | | | | | | | | | | | | | | | * thread_win32.ci, thread_win32.h, thread_pthread.ci, thread_pthread.h: prepare native_cond_*() which are based on pthread_cond_*() spec. * prelude.rb: fix Mutex#synchronize method. * vm_core.h, include/ruby/intern.h: change unblock function interface (to pass some user data). * file.c, process.c: ditto. * benchmark/bm_vm2_mutex.rb: add a benchmark for mutex. * benchmark/bm_vm3_thread_mutex.rb: add a benchmark for mutex with contension. * benchmark/run.rb: fix to remove ENV['RUBYLIB'] for matzruby. * test/ruby/test_thread.rb: add a test. * common.mk: fix benchmark options. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_each_byte): caused infinite loop. [ruby-dev:31652]matz2007-08-261-3/+3
| | | | | | | | | | | | | * io.c (rb_io_getc): should return nil at EOF, not EOFError. * lib/delegate.rb (SimpleDelegator::__setobj__): use raise argument to specify backtrace. * test/ruby/test_fnmatch.rb (TestFnmatch::bracket_test): String#include? no longer works for Fixnum. use #chr. [ruby-dev:31652] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix to remove Fiber.new until fiber.so is not loaded.ko12007-08-261-1/+1
| | | | | | | | * test/ruby/test_continuation.rb: fix to use resume. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_fiber.rb: fix to require 'continuation'.ko12007-08-251-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test assignment order.akr2007-08-251-2/+11
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: separate Continuation and Fiber from core.ko12007-08-253-8/+10
| | | | | | | | | | | | | | * ext/continuation/*, ext/fiber/*: ditto. * include/ruby/ruby.h: remove rb_cFiber. * include/ruby/intern.h: add the rb_fiber_new() declaration. * enumerator.c (next_init): fix to use rb_fiber_new(). * test/ruby/test_enumerator.rb: remove next? tests. * test/ruby/test_continuation.rb: add a require 'continuation'. * test/ruby/test_fiber.rb: add a require 'fiber'. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/sentence.rb (Sentence): include Enumerable.akr2007-08-242-55/+70
| | | | | | | | | (Sentence#each): defined. * test/ruby/test_assignment.rb: use Sentence#expand. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (enumerator_next): stop pre-fetching.matz2007-08-241-2/+4
| | | | | | | | * enumerator.c (Init_Enumerator): remove next? method. * eval.c (rb_f_loop): now handles StopIteration exception. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.matz2007-08-244-8/+8
| | | | | | | | | | * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize): initialize @workdir to stop warning. * lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): replace funcall by send!. other files in the distribution as well. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * util.c (ruby_strtod): replaced by the implementation by Davidmatz2007-08-211-0/+2
| | | | | | | | | | | | M. Gay inspired by William D. Clinger's paper "How to Read Floating Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. a patch from Satoshi Nakagawa <snakagawa AT infoteria.co.jp>. [ruby-dev:31582] * test/ruby/test_float.rb (TestFloat::test_float): add test for precision. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: add Fiber#resume and Fiber.yield.ko12007-08-211-30/+51
| | | | | | | | | | | and Fiber::Core class to realize Coroutine. * include/ruby/intern.h: declare rb_fiber_yield(), rb_fiber_resume(), * enumerator.c: use above api. * test/ruby/test_fiber.rb: fix and add tests for above changes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_enumerator.rb: fix last commit.ko12007-08-201-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e