aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* * regparse.c (parse_char_class): should match with a hyphen after ausa2012-10-131-7/+7
| | | | | | | | | | | | | | | | | | | | | range in a character class. * test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong test. * test/ruby/test_regexp.rb (TestRegexp#check): now can accept the error message. * test/ruby/test_regexp.rb (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed because the previous name was wrong. * test/ruby/test_regexp.rb (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added more test pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_regexp.rbusa2012-10-121-0/+10
| | | | | | | | (TestRegexp#test_raw_hyphen_and_type_char_after_range): added new test. ref [ruby-core:47115] [Backport #6853] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use tty(1) to check if /dev/tty is usable or notnaruse2012-10-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_cgi.rb: skip a test on Windowsshirosaki2012-10-121-2/+7
| | | | | | | | | * test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test depending on locale on Windows. ENV[] doesn't work properly if console code page is not equal to file system encoding. [ruby-core:47910] [Bug #7140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: poisoned NULnobu2012-10-121-0/+10
| | | | | | | * file.c (rb_get_path_check): path name must not contain NUL bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix wrong condition of skipping test_ioctl_linuxnaruse2012-10-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_string.rb: missing testnobu2012-10-111-0/+6
| | | | | | * test/ruby/test_string.rb (test_each_codepoint): missing test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_string.rb: suppress warningsnobu2012-10-111-1/+5
| | | | | | | | | | * test/ruby/test_string.rb (test_match_method): use unique objects in TestString and TestString2. * test/ruby/test_string.rb (test_ascii_incomat_inspect): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_string.rb: highlightingnobu2012-10-111-2/+2
| | | | | | | * test/ruby/test_string.rb (test_LSHIFT, test_succ): get rid of ruby-mode.el confusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Rename variablsnaruse2012-10-101-4/+3
| | | | | | | * uid always stores uid * user stores username or nil git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Test both username and uidnaruse2012-10-101-1/+10
| | | | | | | * system(, uid: ) takes username or uid * ENV["USER"] may be nil (sudo or jail) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_process.rb (TestProcess#test_execopts_gid): skip onusa2012-10-101-0/+1
| | | | | | | | windows because the platform does not have Process.group method. patched by Jon Forums in [ruby-core:47878] [Bug #7133]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* envutil.rb: assert_file and assert_file_notnobu2012-10-097-18/+28
| | | | | | | | * test/ruby/envutil.rb (assert_file, assert_file_not): more descriptive assertions for File predicates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: use rb_random_ulong_limitednobu2012-10-092-6/+7
| | | | | | | | * array.c (rb_ary_sample): use rb_random_ulong_limited, since precision of long may be larger than double. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: uid gid exec optionsnobu2012-10-091-0/+44
| | | | | | | | * process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and :gid options. [ruby-core:47414] [Feature #6975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_refinements): new method Module#refinements.shugo2012-10-081-0/+65
| | | | | | * test/ruby/test_refinement.rb: add new tests for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_config.rb (OpenSSL#test_constants): skip only whennobu2012-10-061-3/+3
| | | | | | DEFAULT_CONFIG_FILE does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_objspace.rb: refinenobu2012-10-061-5/+3
| | | | | | | * test/objspace/test_objspace.rb (test_reachable_objects_from): use proper assertions, and show messages than comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adding a test for initialize_clone and initialize_dup. From Github:tenderlove2012-10-051-0/+11
| | | | | | https://github.com/ruby/ruby/pull/190 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.ko12012-10-051-0/+26
| | | | | | | | | | | | | | | | | This method returns an array of objects referenced by given object. If given object is special objects such as true/false/nil/Fixnum etc then it returns nil. See rdoc for details. [ruby-core:39772] * test/objspace/test_objspace.rb: add a test for this method. * gc.c: add rb_objspace_reachable_objects_from(). To make this function, add several member `mark_func_data' to rb_objspace_t. If mark_func_data is not null, then gc_mark() calls mark_func_data::mark_func. * gc.h: export rb_objspace_reachable_objects_from(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_settracefunc.rb (test_tracepoint):ko12012-10-041-53/+0
| | | | | | | | | remove unused test case. (this test case is redefined by newer tests) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/html5.rb: Add html5 tag maker.xibbar2012-10-041-0/+8
| | | | | | | * lib/cgi/core.rb: ditto. [Feature #6637] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: improved IO#reopennobu2012-10-031-0/+68
| | | | | | | | * io.c (rb_io_reopen): improvement to accept optional arguments. a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806]. [Feature #7103] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do notshugo2012-10-021-0/+50
| | | | | | taint messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_enumerator.rb (enum_test, test_inspect): remove unusednagachika2012-09-301-2/+1
| | | | | | variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_concat): use memcpy to copy a string which containsnaruse2012-09-301-0/+6
| | | | | | NUL characters. [ruby-core:47751] [Bug #7090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* envutil.rb: kill child process when timeoutshirosaki2012-09-292-1/+6
| | | | | | | | | | | * test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process before Timeout::Error is raised. rmdir of mktmpdir fails with EACCES if child process is alive on Windows. * test/thread/test_queue.rb (TestQueue): increase timeout. This test takes long time on Windows XP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_http.rb: clear environment variablesshirosaki2012-09-291-11/+15
| | | | | | | | | | * test/net/http/test_http.rb (TestNetHTTP#test_proxy_address): clear environment variables. If http_proxy environment variable was set, the test failed. * test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drbtest.rb: use :KILL on Windowsshirosaki2012-09-291-2/+2
| | | | | | | | | | | * test/drb/drbtest.rb (DRbCore#teardown): Use Process.kill :KILL on Windows because Process.kill :INT silently fails on Windows 7 and raises EINVAL on Windows XP for spawned process with new_pgroup: false. * test/drb/drbtest.rb (DRbAry#teardown): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_unicode_escape.rb: set script encodingshirosaki2012-09-291-5/+2
| | | | | | | | * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic): set script encoding to work with LANG=C. It would work on both Windows and Unix. Refix of r37051. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (rb_vm_using_modules): use using_modules beforeshugo2012-09-291-0/+56
| | | | | | | | | | | | | | | klass to fix method lookup order, and use klass even if klass is not a module to make refinements in class_eval invoked on classes work. * eval.c (rb_using_module): accept a class as the second argument. * eval.c (rb_mod_using, f_using): raise a TypeError if the argument is not a module. * test/ruby/test_refinement.rb: add new tests for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):shirosaki2012-09-281-1/+5
| | | | | | | Use ruby only on Windows since the test fails on Unix with LANG=C. [ruby-core:47709] [Bug #7076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_unicode_escape.rb: fix test for Windowsshirosaki2012-09-281-1/+2
| | | | | | | | | * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic): echo command doesn't work properly against non-ascii character on Windows with chcp 437. Instead we use ruby. [ruby-core:47709] [Bug #7076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (search_method): copy refinement iclasses to searchshugo2012-09-281-0/+18
| | | | | | | | superclasses correctly. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: IO#reopen int modenobu2012-09-281-0/+19
| | | | | | | | * io.c (rb_io_reopen): accept File::Constants as well as mode string. based on the patch by Glass_saga (Masaki Matsushita) in [ruby-core:47694]. [Feature #7067] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_overlay_module, rb_mod_refine): accept a module as theshugo2012-09-271-1/+57
| | | | | | | | | | | | argument of Module#refine. * vm_method.c (search_method): if klass is an iclass, lookup the original module of the iclass in omod in order to allow refinements of modules. * test/ruby/test_refinement.rb: add tests for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syslog/lib/syslog/logger.rb: add a formatter to theknu2012-09-271-1/+11
| | | | | | | Syslog::Logger object. [Bug #7065] * test/syslog/test_syslog_logger.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def: add new instruction `opt_empty_p' for optimize `empty?'ko12012-09-261-0/+18
| | | | | | | | | | | | | method. Apply a patch proposed at [ruby-dev:46120] [ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita). * compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h: ditto. * id.c, template/id.h.tmpl: ditto. * test/ruby/test_optimization.rb: test for this changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "Darwin 12 (OS X Mountain Lion) also has Bug #6692"naruse2012-09-261-1/+1
| | | | | | | This reverts commit r37033. darwin12 seems to use an address started with fe80. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Darwin 12 (OS X Mountain Lion) also has Bug #6692naruse2012-09-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_gem_installer.rb: restore ARGVnobu2012-09-251-2/+3
| | | | | | | | | * test/rubygems/test_gem_installer.rb (TestGemInstaller#test_install_creates_binstub_that_dont_trust_encoding): restore ARGV properly, non-ascii strings in different encodings are not equal. [ruby-core:45975] [Bug #6673] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_super.rb: super from BEGINnobu2012-09-251-4/+10
| | | | | | | * test/ruby/test_super.rb (TestSuper#test_super_in_BEGIN): for BEGIN. [ruby-core:47680] [Bug #7064] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* insns.def: super from at_exitnobu2012-09-251-0/+11
| | | | | | | * insns.def (invokesuper): klass in cfp is not valid in at_exit and END blocks. [ruby-core:47680] [Bug #7064] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (rb_iseq_defined_string): the index of defined_strings mustnaruse2012-09-241-0/+5
| | | | | | be the value of type - 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_predicate for unary operatornaruse2012-09-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Feature #7035nobu2012-09-241-0/+6
| | | | | | | | * compile.c (defined_expr), insns.def (defined): share single frozen strings. [EXPERIMENTAL] [ruby-core:47558][Feature #7035] * iseq.c (rb_iseq_defined_string): make expression strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/drb/ssl.rb (DRb::DRbSSLSocket::SSLConfig::DEFAULT): addnaruse2012-09-202-1/+23
| | | | | | | | | | | | SSLTmpDhCallback for configuration option. * lib/drb/ssl.rb (setup_ssl_context): copy the value of tmp_dh_callback. * test/drb/ut_array_drbssl.rb: set tmp_dh_callback to suppress warning. * test/drb/ut_drb_drbssl.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check @there if it is nil to prevent infinite loopnaruse2012-09-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/drb/ut_drb.rb: revert a part of r36987, and get rid of a warningusa2012-09-201-1/+2
| | | | | | | | with another method. if the substitution is removed, the ExtSrv object will be GC'ed and some tests will be blocked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c, enum.c: TypeError in zipnobu2012-09-192-2/+2
| | | | | | | | | | * array.c (take_items), enum.c (enum_zip): raise TypeError at non-enumerable objects, not NoMethodError. [ruby-dev:46145] [Bug #7038] * vm_eval.c (rb_check_block_call): check_funcall variant with block function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e