aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* parse.y: fix KWD2EIDnobu2017-10-051-0/+9
| | | | | | | * parse.y (KWD2EID): should respect the previous callback result for keywords. [ruby-core:83106] [Bug #13971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix var_fieldnobu2017-10-041-18/+39
| | | | | | | | | | | | | | | | * parse.y (mlhs_node): dispatch var_field as well as lhs. * parse.y (lhs, var_hs): dispatch var_field before assignable check so it is inside assign_error at a wrong assignment, as well as backref_assign_error. * parse.y (var_field_gen): wrap var_field value with the variable ID. * parse.y (assignable_gen, const_decl_gen): return the callback result on a syntax error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_sexp.rb: test for fnamenobu2017-10-041-0/+12
| | | | | | | * test/ripper/test_sexp.rb (test_def_fname): test for fname in def statement. [ruby-core:83089] [Bug #13967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix leaked file descriptorkazu2017-10-031-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: backref_assign_errornobu2017-10-031-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_call.rb: refine test_safe_callnobu2017-10-021-3/+3
| | | | | | | | * test/ruby/test_call.rb (test_safe_call): rhs should not be evaluated when the receiver is nil. simplified the assertion for [Bug #13964]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: fix stack consitency errornobu2017-10-021-0/+1
| | | | | | | | * compile.c (iseq_compile_each0): fix stack consitency error on attr-assign with safe navigation operator when the receiver is nil, should pop it too. [ruby-core:83078] [Bug #13964] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: check null charnobu2017-10-021-0/+6
| | | | | | | | * io.c (ruby_set_inplace_mode): check if null is contained. based on the patch by tommy (Masahiro Tomita) in [ruby-dev:50272]. [Bug #13960] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_argf.rb: indent here docsnobu2017-10-021-311/+367
| | | | | | | | | | * test/ruby/test_argf.rb (assert_src_expected): default line number to caller's location. * test/ruby/test_argf.rb (test_lineno, test_lineno2): get rid of a bug of wrong indentation after $. in Emacs 25.3 ruby-mode.el git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_refinement.rb: test for r59946nobu2017-10-011-0/+15
| | | | | | | | * test/ruby/test_refinement.rb (test_dsym_literal): test for r59946, interning dynamic symbol should not be affected by refinements too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c: check typenobu2017-09-301-0/+21
| | | | | | | * eval.c (ignored_block): check argument type, which must be Module. [ruby-dev:50270] [Bug #13956] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_find.rb: improve branch coveragektsj2017-09-301-0/+17
| | | | | | | * test/test_find.rb (test_to_path): add a test for to_path conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix ASCII-only on succnobu2017-09-301-0/+5
| | | | | | | | * string.c (str_succ): clear coderange cache when no alpha-numeric character case, carried part may become ASCII-only. [ruby-core:83062] [Bug #13952] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_etc.rb: fix test_getgrnam for duplicated group namessonots2017-09-291-3/+3
| | | | | | | | * test/etc/test_etc.rb: Etc.getgrnam would not return the first entry in the order of Etc.group for duplicated group names. follow-up: [Bug #6935] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: ASCII-incompatible is not ASCII onlynobu2017-09-291-1/+6
| | | | | | | * string.c (tr_trans): ASCII-incompatible encoding strings cannot be ASCII-only even if valid. [ruby-core:83056] [Bug #13950] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pack.c: unpack "M" may be ASCII onlynobu2017-09-291-0/+5
| | | | | | | * pack.c (pack_unpack_internal): set ASCII only properly on "M", may be ASCII only. [ruby-core:83055] [Bug #13949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: improve operations on small arraysnobu2017-09-291-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Feature #13884] Reduce number of memory allocations for "and", "or" and "diff" operations on small arrays Very often, arrays are used to filter parameters and to select interesting items from 2 collections and very often these collections are small enough, for example: ```ruby SAFE_COLUMNS = [:id, :title, :created_at] def columns @all_columns & SAFE_COLUMNS end ``` In this patch, I got rid of unnecessary memory allocations for small arrays when "and", "or" and "diff" operations are performed. name | HEAD | PATCH -----------------+------:+------: array_small_and | 0.615 | 0.263 array_small_diff | 0.676 | 0.282 array_small_or | 0.953 | 0.463 name | PATCH -----------------+------: array_small_and | 2.343 array_small_diff | 2.392 array_small_or | 2.056 name | HEAD | PATCH -----------------+------:+------: array_small_and | 1.429 | 1.005 array_small_diff | 1.493 | 0.878 array_small_or | 1.672 | 1.152 name | PATCH -----------------+------: array_small_and | 1.422 array_small_diff | 1.700 array_small_or | 1.452 Author: Dmitry Bochkarev <dimabochkarev@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_dln.rb: fix path separator on MinGWshirosaki2017-09-281-1/+1
| | | | | | | | | * test/-ext-/win32/test_dln.rb (TestDln#test_check_imported): RbConfig::CONFIG["PATH_SEPARATOR"] is : which is a separator on msys2 shell building ruby. Use File::PATH_SEPARATOR ; on test. [Bug #13642] [ruby-core:81623] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Net::HTTP.new: Support no_proxy parameter [Feature #11195]naruse2017-09-281-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* URI::Generic: Separate no_proxy handlingnaruse2017-09-281-0/+17
| | | | | | To share with Net::HTTP. see #11195 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: flushnobu2017-09-281-0/+4
| | | | | | | * test/io/console/test_io_console.rb: flush to ensure the second data is sent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: no overflownobu2017-09-271-0/+3
| | | | | | | * complex.c (rb_complex_infinite_p): get rid of overflow and unnecessary multiplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: no overflownobu2017-09-271-0/+3
| | | | | | | * complex.c (rb_complex_finite_p): get rid of overflow and unnecessary multiplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make retries for Net::HTTP configurable [Feature #10674]naruse2017-09-261-0/+50
| | | | | | | by stereobooster fix https://github.com/ruby/ruby/pull/1654 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warnings by other than self-assignmentsnobu2017-09-261-5/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_erb.rb: add test cases for uncovered methodsk0kubun2017-09-261-0/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_features.rb: fix unused variable warningk0kubun2017-09-261-1/+1
| | | | | | test/csv/test_features.rb:357: warning: assigned but unused variable - csv git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_drb.rb: removed extra spacesnobu2017-09-261-3/+3
| | | | | | | | * test/drb/test_drb.rb (TestDRbLarge#test_02_large_ary): removed unnecessary extra spaces which make the following parentheses an expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* HTTPHeader#add_field should allow binary [Bug #13926]naruse2017-09-251-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Time#at receives 3rd argument which specifies the unit of 2nd argument ↵naruse2017-09-251-0/+11
| | | | | | [Feature #13919] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_iseq.rb: Skip test_safe_call_chain if Coverage is running.yui-knk2017-09-251-1/+3
| | | | | | | | | | | Follow up to r59990. When Coverage is running, trace2 instructions are inserted to take branch coverages for safe method invocations. This insertion makes safe call chains unable to be optimized and breaks this test case. So we test it only when Coverage is not running. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: import e72d960db262rhe2017-09-243-22/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with master branch of ruby/openssl.git to import changes in v2.1.0.beta1..v2.0.6. The commit log since v2.1.0.beta1 which was imported by r59734 can be found at: https://github.com/ruby/openssl/compare/v2.1.0.beta1...e72d960db262 ---------------------------------------------------------------- Kazuki Yamaguchi (16): test/test_pair: fix test_write_nonblock{,_no_exceptions} x509name: fix a typo in docs test/test_fips: skip if setting FIPS mode fails test/test_asn1: fix possible failure in test_utctime test/test_ssl: suppress warning in test_alpn_protocol_selection_cancel test/test_pair: disable compression test/test_ssl: skip tmp_ecdh_callback test for LibreSSL >= 2.6.1 test/test_ssl: do not run NPN tests for LibreSSL >= 2.6.1 tool/ruby-openssl-docker: update test/test_pair: replace sleep with IO.select ssl: prevent SSLSocket#sysread* from leaking uninitialized data ossl.c: use struct CRYPTO_dynlock_value for non-dynamic locks ossl.c: make legacy locking callbacks reentrant test/test_engine: suppress stderr test/test_engine: check if RC4 is supported Ruby/OpenSSL 2.0.6 SHIBATA Hiroshi (1): To use upstream url of github nobu (1): ruby.h: unnormalized Fixnum value git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_gc.rb: relax criterionnobu2017-09-241-1/+1
| | | | | | | * test/ruby/test_gc.rb (TestGc#test_expand_heap): relax the criterion and compare by epsilon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gem.rb: load rubygems.rbnobu2017-09-241-4/+2
| | | | | | | * test/rubygems/test_gem.rb: load rubygems.rb explicitly, for the case configured as --disable-rubygems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed ubygems.rb. rubygems.rb is always loaded now.hsbt2017-09-241-2/+4
| | | | | | | | * tool/sync_default_gems.rb: removed ubygems.rb from sync target. * test/rubygems/test_gem.rb: only enable "-rubygems" option when running under the Ruby 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: fix rb_load_protect conditionnobu2017-09-242-0/+16
| | | | | | | * load.c (rb_load_protect): fix the condition to load the found file. fixup of r59155. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/coverage/test_coverage.rb: Refactor coverage tests.mame2017-09-231-124/+116
| | | | | | | Add `assert_coverage` to invoke Ruby script under coverage measurement and to compare the result with an expected value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dup String#split return valuenobu2017-09-231-0/+5
| | | | | | | | | * string.c (rb_str_split): return duplicated receiver, when no splits. patched by tompng (tomoya ishida) in [ruby-core:82911], and the test case by Seiei Miyagi <hanachin@gmail.com>. [Bug#13925] [Fix GH-1705] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dup String#rpartition return valuenobu2017-09-231-0/+5
| | | | | | | | | * string.c (rb_str_rpartition): return duplicated receiver, when no splits. [ruby-core:82911] [Bug#13925] Author: Seiei Miyagi <hanachin@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dup String#partition return valuenobu2017-09-231-1/+6
| | | | | | | | | * string.c (rb_str_partition): return duplicated receiver, when no splits. [ruby-core:82911] [Bug#13925] Author: Seiei Miyagi <hanachin@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Enable to take branch coverages for safe method invocationsyui-knk2017-09-231-0/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: use NUM2DBLnobu2017-09-222-0/+19
| | | | | | | | * numeric.c (fix_fdiv_double), bignum.c (rb_big_fdiv_double): use NUM2DBL on unknown object. RFLOAT_VALUE is only appliicable to T_FLOAT object. [ruby-core:82924] [Bug #13928] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: real path to loadnobu2017-09-212-1/+15
| | | | | | | | * load.c (rb_construct_expanded_load_path): expand load paths to real paths to get rid of duplicate loading from symbolic-linked directories. [Feature #10222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process: block/unblock signals around forknormal2017-09-201-0/+10
| | | | | | | | | | | | | | As with forking for execve(2) in `spawn', we must block signals to ensure they are handled correctly in a freshly `fork'-ed child. * process.c (retry_fork_ruby): block/unblock signals around fork (rb_fork_ruby): re-enable signals in forked child * test/ruby/test_process.rb (test_forked_child_signal): new test [ruby-core:82883] [Bug #13916] Thanks to Russell Davis for the bug report and test case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add MonitorMinx#mon_locked? and #mon_owned? to check states of objectsshugo2017-09-201-0/+29
| | | | | | Patched by Satoshi "Moris" Tagomori <tagomoris@gmail.com>. [Fix GH-1699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c: paragraph mode by -00nobu2017-09-201-0/+2
| | | | | | | | * ruby.c (proc_options): set to paragraph mode, if -00 is given, as well as perl and -R0 option in 0.49. [ruby-core:81987] [Bug #13736] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Alias Set#=== to #include?knu2017-09-191-0/+17
| | | | | | | | * set.rb (Set#===): Added via [Feature #13801] by davidarnold. Closes #1673. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: report then abortnobu2017-09-191-1/+15
| | | | | | | * thread.c (thread_start_func_2): report then abort on exception, if both are set. [ruby-core:79280] [Bug #13163] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: lex by lvarnobu2017-09-191-0/+11
| | | | | | | * parse.y (parse_ident): disable tLPAREN_ARG state by local variable. [ruby-list:50578] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: fix `cfp consistency error' which occursktsj2017-09-181-0/+21
| | | | | | | | | when raising exception in bmethod call event * vm.c (invoke_bmethod): set FINISH flag just before calling vm_exec. [ruby-dev:50162] [Bug #13705] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e