summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-06-29compile.c: disallow next in oncenobu
* compile.c (iseq_compile_each0): turned dregx context in "once" into "guarded" type from "block" type, to disallow `next`, `break`, `redo` as well as outside "once". [ruby-core:81805] [Bug #13690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28introduce rb_fiber_t::first_proc.ko1
* cont.c (rb_fiber_t): add rb_fiber_t::first_proc and do not use rb_thread_t::first_proc which should be thread local. [Bug #13689] * test/ruby/test_thread.rb: test for [Bug #13689]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28parse.y: fix tokennobu
* parse.y (parser_parse_string): return proper token tREGEXP_END at unterminated regexp. [Bug #13363] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28parse.y: add ellipsisnobu
* parse.y (parser_yyerror): add ellipsis properly when error line is truncated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28parse.y: flush numeric tokennobu
* parse.y (parser_number_literal_suffix, parse_numeric): flush numeric token so following unexpected token part is marked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28add two testsduerst
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28parse.y: fix parser_yyerrornobu
* parse.y (parser_yyerror): fix buffer overflow at truncation of error line. [ruby-core:81790] [Bug #13687] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-27fix return in toplevel ensurenobu
* compile.c (iseq_compile_each0): adjust stack after return in toplevel ensure, when the value is used. [ruby-core:81777] [Bug #13682] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-27fix return in toplevel rescue/ensurenobu
* compile.c (iseq_compile_each0): throw TAG_RETURN at return in toplevel rescue/ensure to adjust VM stack properly. [ruby-core:81777] [Bug #13682] * vm_insnhelper.c (vm_throw_start): allow return in toplevel rescue/ensure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-27vm_insnhelper.c: break in oncenobu
* vm_insnhelper.c (vm_throw_start): size of catch table has been included in iseq_catch_table struct, which could be NULL, since 2.2. e.g., proc-closure in `once'. [ruby-core:81775] [Bug #13680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-25compile.c: toplevel return in argumentnobu
* compile.c (iseq_compile_each0): adjust the stack before return in an evstr/argument (reported by Balazs <balazs@kutilovi.cz>) to fix stack consistency error. [ruby-core:81761] [Bug #13678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-24Delegate to `eql?` [Fix GH-1564]nobu
* lib/delegate.rb (eql?): Delegate to `eql?` of the inner object. based on the patch by giginet <giginet.net@gmail.com>. [ruby-core:76950] [Bug #12684] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-23test_command_processor.rb: add suffixnobu
* test/shell/test_command_processor.rb (test_option_type): Windows needs a suffix to execute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-23parse.y: should not warn op method callnobu
* parse.y (void_expr_gen): should warn operator expression style calls only, but not method style calls. [Fix GH-1660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-23parse.y: check multibyte charnobu
* parse.y (parser_precise_mbclen): check invalid multibyte char at skipping strings following `?x` literal string, not to stuck in a infinite loop. [ruby-core:81746] [Bug #13672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-23skip on other threads (again).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-23revert r59151 which introduce failures.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-23skip on other threads.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-23Revert "Allow IO#reopen to take a block"glass
This reverts r59142. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-22fix mortal_dynamic_symbol countnobu
* test/objspace/test_objspace.rb (test_count_symbols): exclude a dynamic symbol which has been turned into immortal by define_method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-22Fix exception type in option type checkerglass
* lib/shell/system-command.rb (SystemCommand#initialize): `def_e2message` wraps error message, but does not define new exception * test/shell/test_command_processor.rb: add a test This patch is authored by Kenichi Kamiya <kachick1@gmail.com> close #1657 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-22try to fix symbol duplication.ko1
* test/objspace/test_objspace.rb (test_count_symbols): make more complex dynamic symbols to avoid conflict with other existing static symbols. Sometimes this test fails with "mortal_dynamic_symbol=>127". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-22Allow IO#reopen to take a blockglass
* io.c (rb_io_reopen): take a block and ensure the IO closed [Feature #2631] * test/ruby/test_io.rb: add a test * NEWS: add an entry for this change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-22catch up frozen_string_literal: true.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-22gc.c: expand sorted pagesnobu
* gc.c (heap_page_allocate): expand sorted pages before inserting allocated new page. [Bug #12670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-21test/ruby/test_string.rb: add tests to chomp substrsonots
* test/ruby/test_string.rb (TestString#test_chomp): add tests to chomp substr * test/ruby/test_string.rb (TestString#test_chomp!): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-21string.c: add String#delete_prefix and String#delete_prefix!sonots
to remove leading substr [Feature #12694] [fix GH-1632] * string.c (rb_str_delete_prefix_bang): add a new method to remove prefix destuctively. * string.c (rb_str_delete_prefix): add a new method to remove prefix non-destuctively. * test/ruby/test_string.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-21Fix Enumerable#uniq with non single yield argumentsnobu
* enum.c (uniq_func, uniq_iter): need packed value as the unique key. [ruby-core:81734] [Bug #13669] [Fix GH-1658] Author: Kenichi Kamiya <kachick1@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-20Fixed missing handling for frozen object at r59121.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-20Specify frozen_string_literal: true.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-20skip unresolved issue.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-19test for [Bug #12670]nobu
heap corruption by deferred free. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-18string.c: check just before modificationnobu
* string.c (rb_str_chomp_bang): check if modifiable after checking an argument and just before modification, as it can get frozen during the argument conversion to String. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-18test_string.rb: chomp! frozen stringnobu
* test/ruby/test_string.rb (TestString#test_chomp): should raise if frozen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-18test/unit.rb: close jobservernobu
* test/lib/test/unit.rb (Test::Unit::Parallel#flush_job_tokens): close jobserver auth fds aflter flush, not to release tokens more than acquired. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16pathname.rb: UNC root pathname needs a separatornobu
* ext/pathname/lib/pathname.rb (Pathname#plus): UNC root pathname needs a separator. File.basename returns "/" on UNC root, as well as sole drive letter, even if it does not end with a separator. [ruby-core:80900] [Bug #13515] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16Merge psych-3.0.0.beta2 from https://github.com/ruby/psychhsbt
It contains following changes from 3.0.0.beta1 * Preserve time zone offset when deserializing times https://github.com/ruby/psych/pull/316 * Enable YAML serialization of Ruby delegators https://github.com/ruby/psych/pull/158 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16require 'bigdecimal'ko1
* test/json/json_parser_test.rb: this test needs bigdecimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16Merge json-2.1.0 from https://github.com/flori/jsonhsbt
https://github.com/flori/json/blob/master/CHANGES.md#2017-04-18-210 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-14proc.c: infect inspect resultnobu
* proc.c (method_inspect): the result should be infected by the object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-14test/ruby/test_method.rb: refined [ruby-core:81666] [Bug #13656]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-14openssl: import v2.0.4rhe
Import Ruby/OpenSSL 2.0.4. Only bug (and typo) fixes. The full commit history since v2.0.3 (imported at r57482) can be found at: https://github.com/ruby/openssl/compare/v2.0.3...v2.0.4 This contains the fix for [Bug #11033]. ---------------------------------------------------------------- Jun Aruga (1): Update .travis.yml and Dockerfile Kazuki Yamaguchi (9): test/test_pkey_ec: do not use dummy 0 order test/test_ssl: fix typo in test_sysread_and_syswrite ssl: check return value of SSL_set_fd() Fix typos test/test_x509store: skip OpenSSL::TestX509Store#test_set_errors tool/sync-with-trunk: 'LASY' -> 'LAST' x509store: clear error queue after calling X509_LOOKUP_load_file() extconf.rb: simplify searching libraries logic Ruby/OpenSSL 2.0.4 SHIBATA Hiroshi (1): Fix typos Vladimir Rybas (1): Fix documentation for OpenSSL::Cipher#final nobu (2): openssl: fix broken openssl check openssl: fix broken openssl check usa (1): Search SSL libraries by testing various filename patterns git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-14proc.c: skip prepended modulesnobu
* proc.c (method_super_method): skip prepended modules and continue from the super class of the original class. [ruby-core:81666] [Bug #13656] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-12remove ruby_kill() introduced for [Bug #7951].ko1
* thread.c (rbuy_kill): removed. This function is used with SIGSEGV, SIGBUS, SIGKILL, SIGILL, SIGFPE and SIGSTOP and these signals are affect immediately. So that `kill(2)' is enough for them. * signal.c (rb_f_kill): ditto. * vm_core.h (rb_thread_t::interrupt_cond): removed because only `ruby_kill()' uses this field. * test/ruby/test_signal.rb: Without this patch sending SIGSTOP to own process wait another interrupt even if another process sends SIGCONT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-12iseq.c: preserve encodingnobu
* iseq.c (iseqw_inspect): preserve path encoding in the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-12* proc.c (get_local_variable_ptr): return found env ptr. Returned envko1
will be used by write barrier at `bind_local_variable_set()'. [Bug #13605] * test/ruby/test_proc.rb: add a test for this issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-10enumerator.c: fix nested mapsnobu
* enumerator.c (lazy_map_proc, lazy_grep_iter_proc): marks values returned by blocks are not packed in the case of nested maps, so that the result will be same as non-lazy version. based on the patch by akihikodaki (Akihiko Odaki) at [ruby-core:81638], without GCC extension. [Bug#13648] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-08check break target correctly.ko1
* compile.c (iseq_compile_each0): save target child_iseq in the catch-table for break. This iseq is not for continuation, but for search key at vm_throw_start(). * vm_insnhelper.c (vm_throw_start): check saved iseq first. * iseq.h: add comment for it. * test/ruby/test_iterator.rb (test_ljump): add a test for the issue: def call b; b.call; end call(Proc.new{break}){} #=> (1) should raise LocalJumpError call(Proc.new{break}) #=> (2) shoudd raies LocalJumpError, too. but (1) doesn't raise LocalJumpError. This issue is reported by Matz. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-07rexml: add close tag check on end of document to StreamParserkou
[ruby-core:81593] [Bug #13636] Reported by Anton Sivakov. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-07thread.c: avoid busy looping on rb_thread_fd_closenormal
We no longer use it this function, but extensions do, and we need to ensure it continues to work for them. * thread.c (rb_thread_fd_close): schedule other threads in loop * ext/-test-/thread_fd_close/thread_fd_close.c: new file * ext/-test-/thread_fd_close/depend: ditto * ext/-test-/thread_fd_close/extconf.rb: ditto * test/-ext-/thread_fd_close/test_thread_fd_close.rb: new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e