aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* * test/ruby/test_exception.rb: fix thread issues.ko12016-09-131-3/+5
| | | | | | | | * use Queue instead of a local variable for synchronization. * join created thread to soleve leaking threads warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix buffer overflow check condition in rb_str_set_len()rhe2016-09-131-0/+9
| | | | | | | | | | | | * string.c (rb_str_set_len): The buffer overflow check is wrong. The space for termlen is allocated outside the capacity returned by rb_str_capacity(). This fixes r41920 ("string.c: multi-byte terminator", 2013-07-11). [ruby-core:77257] [Bug #12757] * test/-ext-/string/test_set_len.rb (test_capacity_equals_to_new_size): Test for this change. Applying only the test will trigger [BUG]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: workaround for Ubuntu's patched OpenSSLrhe2016-09-131-2/+5
| | | | | | | | | | * test/openssl/test_ssl.rb (test_ctx_options): Add a workaround for patched OpenSSL to fix the Ruby CI failure on Ubuntu 16.04. http://rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20160913T033003Z.fail.html.gz This commit is a cherry-pick of the following commit at ruby/openssl: https://github.com/ruby/openssl/commit/f9c04779a84b45d85dc26dc19ea600d0613539e2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/mailto.rb: Removed needless `return` and use `.`` instead of `::`hsbt2016-09-121-0/+51
| | | | | | | with class method. * test/uri/test_mailto.rb: Added tests for coverage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json_generator_test.rb: no Bignumnobu2016-09-091-2/+3
| | | | | | | * test/json/json_generator_test.rb (test_broken_bignum): get rid of use of Bignum, obsolete name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: set cause by Thread#raisenobu2016-09-091-0/+46
| | | | | | | | * thread.c (rb_threadptr_raise): set cause from the called thread, but not from the thread to be interrupted. [ruby-core:77222] [Bug #12741] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: fix deprecated constant messagenobu2016-09-091-0/+1
| | | | | | | * variable.c (rb_const_search): warn with the actual class/module name which defines the deprecated constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: fix private constant messagenobu2016-09-091-0/+3
| | | | | | | * variable.c (rb_const_search): raise with the actual class/module name which defines the private constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (flatten): use rb_obj_class instead of rb_class_ofktsj2016-09-081-0/+18
| | | | | | | because rb_class_of may return a singleton class. [ruby-dev:49781] [Bug #12738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_s_used_modules): rename Module.used_refinements toshugo2016-09-081-8/+8
| | | | | | Module.used_modules. [Feature #7418] [ruby-core:49805] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (setclassvariable, setconstant): warn when self is ashugo2016-09-081-0/+16
| | | | | | refinement. [Bug #10103] [ruby-core:64143] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: map_v -> transform_valuesmrkn2016-09-081-6/+6
| | | | | | | | | | * hash.c (rb_hash_transform_values, rb_hash_transform_values_bang): Rename map_v to transform_values. [Feature #12512] [ruby-core:76095] * test/ruby/test_hash.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: import v2.0.0.beta.2rhe2016-09-085-547/+433
| | | | | | | | * {ext,test}/openssl: Import Ruby/OpenSSL 2.0.0.beta.2. The full commit history since v2.0.0.beta.1 can be found at: https://github.com/ruby/openssl/compare/v2.0.0.beta.1...v2.0.0.beta.2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2hsbt2016-09-0717-125/+22
| | | | | | | Fixed ri parse defect with left-hand matched classes. https://github.com/rdoc/rdoc/pull/420 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-09-071-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_s_used_refinements): new methodshugo2016-09-071-0/+49
| | | | | | | Module.used_refinements. based on the patch by Charlie Somerville. [Feature #7418] [ruby-core:49805] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use our domain instead of other's domainkazu2016-09-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timeout.rb: custom error messagenobu2016-09-071-0/+5
| | | | | | | * lib/timeout.rb (Timeout#timeout): add custom error message argument. [Feature #11650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV::{Row,Table}#{each,delete_if}): returns an enumeratorktsj2016-09-072-2/+82
| | | | | | | | | | if no block is given. [ruby-core:75346] [Feature #11058] * test/csv/test_row.rb: add test for above. * test/csv/test_table.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/*, test/psych/*: Update psych-2.1.1hsbt2016-09-072-0/+8
| | | | | | | | This version fixed following pull requests. https://github.com/tenderlove/psych/pull/284 https://github.com/tenderlove/psych/pull/276 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta1hsbt2016-09-071-15/+0
| | | | | | | This version is mostly same as r56072. It contains to remove code for Ruby 1.8 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)hsbt2016-09-058-9/+144
| | | | | | | https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016-- https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use qualified namesnobu2016-08-3014-31/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* import Ruby/OpenSSL 2.0.0.beta.1rhe2016-08-2922-848/+1159
| | | | | | | | | | * NEWS, {ext,test,sample}/openssl: Import Ruby/OpenSSL 2.0.0.beta.1. ext/openssl is now converted into a default gem. The full commit history since r55538 can be found at: https://github.com/ruby/openssl/compare/08e1881f5663...v2.0.0.beta.1 [Feature #9612] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: add an alias pend for skiprhe2016-08-291-0/+3
| | | | | | | | * test/lib/test/unit/assertions.rb (pend): Add an alias 'pend' for 'skip'. This is required for test-unit compatibility. In particular, ext/openssl uses it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* multiple argumentsnobu2016-08-272-1/+12
| | | | | | | | * array.c (rb_ary_concat_multi): take multiple arguments. based on the patch by Satoru Horie. [Feature #12333] * string.c (rb_str_concat_multi, rb_str_prepend_multi): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_regex_casefold.rb: skip if no data filenobu2016-08-261-1/+1
| | | | | | | | * test/ruby/enc/test_regex_casefold.rb (setup): skip with error message if CaseFolding.txt does not present, instead of printing the message, which causes unknown command in parallel test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_ssl_server.rb: fix FD leaknobu2016-08-231-1/+3
| | | | | | | * test/webrick/test_ssl_server.rb (assert_self_signed_cert): close underlying TCP socket to fix FD leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_psych.rb: close Tempfilenobu2016-08-231-2/+3
| | | | | | | * test/psych/test_psych.rb (test_load_file_with_fallback): fix Tempfile leak. https://github.com/tenderlove/psych/pull/288 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: rb_fs_setternobu2016-08-231-4/+5
| | | | | | | * string.c (rb_fs_setter): check and convert $; value at assignment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: $; name in error messagenobu2016-08-221-1/+8
| | | | | | | * string.c (rb_str_split_m): show $; name in error message when it is a wrong object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: undef allocatornobu2016-08-221-0/+4
| | | | | | | * iseq.c (Init_ISeq): undefine allocator of InstructionSequence, to get rid of segfaults at method call on uninitialized object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: lparen_arg statementnobu2016-08-191-0/+5
| | | | | | | * parse.y (primary): allow parenthesised statement as a method argument. [Feature #12686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rand.rb: refine probability testnobu2016-08-181-3/+9
| | | | | | | * test/ruby/test_rand.rb (test_new_seed): refine probability of failure from 1/256 to 1/256**8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: infinite recursionnobu2016-08-131-0/+17
| | | | | | | * numeric.c (num_funcall0, num_funcall1): get rid of infinite recursion in fallback methods of Numeric. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_comparable.rb: fix clamp testnobu2016-08-131-2/+2
| | | | | | | | * test/ruby/test_comparable.rb (TestComparable#test_clamp): fix test. the result which is not clamped should be the receiver. [Feature #10594] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: chained assignmentsnobu2016-08-131-0/+10
| | | | | | | * parse.y (command_asgn, arg): fix syntax errors with chained assignment with op assign. [Bug #12669] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: rescue modifier in rhs of op asgnnobu2016-08-131-6/+78
| | | | | | | * parse.y (stmt, arg): rescue modifier in command op assignment should be limited to rhs only. [ruby-core:75621] [Bug #12402] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: fix newline in syntax errornobu2016-08-121-0/+3
| | | | | | | | * error.c (rb_syntax_error_append): fix newline in syntax error message to the beginning, not after file name and line number. [Feature #11951] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Comparable#clampnobu2016-08-111-0/+14
| | | | | | * compar.c (cmp_clamp): Introduce Comparable#clamp. [Feature #10594] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/prime.rb: Optimize prime?marcandre2016-08-101-10/+7
| | | | | | | | Adapted from patch by Jabari Zakiya [#12665] * test/test_prime.rb: Improve test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: rescue modifier in rhsnobu2016-08-101-0/+10
| | | | | | | * parse.y (command_asgn): rescue modifier in command assignment should be limited to rhs only. [ruby-core:75621] [Bug #12402] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: implement Hash#map_v and Hash#map_v!mrkn2016-08-091-0/+21
| | | | | | | | | * hash.c (rb_hash_map_v, rb_hash_map_v_bang): impelement Hash#map_v and Hash#map_v! [Feature #12512] [ruby-core:76095] * test/ruby/test_hash.rb: add tests for above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_objectspace.rb: errors in a finalizernobu2016-08-091-1/+1
| | | | | | | * test/ruby/test_objectspace.rb (test_finalizer_with_super): adjust number of arguments to get rid of errors in a finalizer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk: Tk is removed from stdlib. [Feature #8539]naruse2016-08-091-2/+0
| | | | | | https://github.com/ruby/tk is the new upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: no verbose in worker processesnobu2016-08-081-1/+1
| | | | | | | | * test/lib/test/unit.rb (Test::Unit::Parallel::Worker.launch): disable verbose flag in worker processes, get rid of unexpected output within marshaled results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* deprecate TRUE,FALSE,NILnobu2016-08-071-3/+1
| | | | | | | * object.c (InitVM_Object): deprecate toplevel constants TRUE, FALSE, and NIL. [Feature #12574] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: avoid undefined behavior on empty SSL_writenormal2016-08-061-0/+11
| | | | | | | | | | | | | | | | | | | SSL_write(3ssl) manpage has this in the WARNINGS section: When calling SSL_write() with num=0 bytes to be sent the behaviour is undefined. And indeed, the new test case demonstrates failures when empty strings are used. So, match the behavior of IO#write, IO#write_nonblock, and IO#syswrite by returning zero, as the OpenSSL::SSL::SSLSocket API already closely mimics the IO one. * ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): avoid undefined behavior * test/openssl/test_pair.rb (test_write_zero): new test [ruby-core:76751] [Bug #12660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: env_name_newnobu2016-08-051-0/+3
| | | | | | | | | * hash.c (env_enc_str_new): make string for an environment variable name or value. * hash.c (env_name_new): make environment value string with the encoding for its name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: set encodingnobu2016-08-041-0/+2
| | | | | | | * hash.c (env_assoc): the encoding of the value should be the locale, as well as other methods, [], fetch, values, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e