aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Check for invalid hex escapes in URI#query=Jeremy Evans2019-10-081-0/+5
| | | | Fixes [Bug #11275]
* more use of RbConfig::LIMITS卜部昌平2019-10-082-5/+3
| | | | `8 * RbConfig::SIZEOF` ... is not straight.
* Import changes from ruby/bigdecimal (#2531)Kenta Murata2019-10-082-21/+43
| | | Sync to ruby/bigdecimal@92356ba71c6bd325b0ab618c634a7aecf8cdc767
* Allow ruby2_keywords to be used with bmethodsJeremy Evans2019-10-071-1/+32
| | | | | | | | There are libraries that use define_method with argument splats where they would like to pass keywords through the method. To more easily allow such libraries to use ruby2_keywords to handle backwards compatibility, it is necessary for ruby2_keywords to support bmethods.
* Add: Array#intersection methodPrajjwal Singh2019-10-071-0/+17
|
* Swap expected and actual correctlyaycabta2019-10-071-50/+50
|
* Revert "tailcall optimization again (#2528)"Koichi Sasada2019-10-061-13/+0
| | | | This reverts commit f62f90367fc3bce6714e7c34cbd040e14e43fe07.
* tailcall optimization again (#2528)wanabe2019-10-061-0/+13
| | | This is follow up of r67315.
* test/dtrace/helper.rb: Etc.getgrnam may return nil on some platformsYusuke Endoh2019-10-061-1/+1
|
* Now keyword parameter warnings are suppressed by 871005bdd204Nobuyoshi Nakada2019-10-051-2/+2
| | | | | | | | | | This reverts commits: * 2a490d5660ac869f8f2bbcec4887b1dc2950643f Suppress assert_match warnings. * d4a86e407ec2057c2c7ad757aa76dad757f34c3a Assert warnings message for the last argument is keyword parameter.
* [rubygems/rubygems] The date might have advanced since TODAY has been setNobuyoshi Nakada2019-10-051-1/+3
| | | | | | https://bugs.ruby-lang.org/issues/16189 https://github.com/rubygems/rubygems/commit/e331222163
* [rubygems/rubygems] Add Gem::Dependency#identity methodbronzdoc2019-10-051-0/+7
| | | | https://github.com/rubygems/rubygems/commit/05146bb2fd
* [rubygems/rubygems] Suppress keywords warning in ruby 2.7Nobuyoshi Nakada2019-10-051-1/+1
| | | | https://github.com/rubygems/rubygems/commit/892bfc11fe
* [rubygems/rubygems] Use dedicated assertion methodsNobuyoshi Nakada2019-10-051-3/+3
| | | | | | For better messages at failures. https://github.com/rubygems/rubygems/commit/971455b16e
* [rubygems/rubygems] Fixed assertion argumentsNobuyoshi Nakada2019-10-051-1/+1
| | | | | | It is `assert_eqal(expected, actual)`. https://github.com/rubygems/rubygems/commit/1d6197a090
* [ruby/fileutils] Use pend instead of skipHiroshi SHIBATA2019-10-031-2/+2
| | | | https://github.com/ruby/fileutils/commit/ba2c24e2d7
* Treat return in block in class/module as LocalJumpError (#2511)Jeremy Evans2019-10-021-0/+4
| | | | | | return directly in class/module is an error, so return in proc in class/module should also be an error. I believe the previous behavior was an unintentional oversight during the addition of top-level return in 2.4.
* Iseq#to_binary: dump flag for **nil (#2508)Alan Wu2019-10-021-0/+11
| | | | RUBY_ISEQ_DUMP_DEBUG=to_binary and the attached test case was failing. Dump the flag to make sure `**nil` can round-trip properly.
* WEBrick: prevent response splitting and header injectionYusuke Endoh2019-10-011-2/+44
| | | | | | | | This is a follow up to d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16. The commit prevented CRLR, but did not address an isolated CR or an isolated LF. Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
* Loop with String#scan without creating substringsNobuyoshi Nakada2019-10-011-0/+22
| | | | | Create the substrings necessary parts only, instead of cutting the rest of the buffer. Also removed a useless, probable typo, regexp.
* Fix for wrong fnmatch pattternNobuyoshi Nakada2019-10-011-0/+6
| | | | | * dir.c (file_s_fnmatch): ensure that pattern does not contain a NUL character. https://hackerone.com/reports/449617
* remove `unused var` warningKoichi Sasada2019-10-011-0/+1
|
* Add rb_enumeratorize_with_size_kw and related macrosJeremy Evans2019-09-302-0/+19
| | | | | | | | | | Currently, there is not a way to create a sized enumerator in C with a different set of arguments than provided by Ruby, and correctly handle keyword arguments. This function allows that. The need for this is fairly uncommon, but it occurs at least in Enumerator.produce, which takes arugments from Ruby but calls rb_enumeratorize_with_size with a different set of arguments.
* test/ruby/test_io.rb: supress a "method redefined" warningYusuke Endoh2019-09-301-0/+3
| | | | by explicitly removing the old definition.
* test/-ext-/string/test_fstring.rb: suppress "possibly useless use of -@"Yusuke Endoh2019-09-301-1/+1
| | | | "in void context" by assigning the result to a dummy variable.
* Use assert_operator instead of mere assertNobuyoshi Nakada2019-09-301-2/+2
|
* Now `use_symbol` is always trueNobuyoshi Nakada2019-09-301-2/+2
|
* Emulate method_list (chkbuild) on test-all.Koichi Sasada2019-09-301-0/+41
| | | | | | | chkbuild (CI process) shows methods list before running tests and sometimes it can fails. This commit a code part to emulate this method listing feature.
* Add three more C-API functions for handling keywordsJeremy Evans2019-09-291-2/+54
| | | | | | | | This adds rb_funcall_passing_block_kw, rb_funcallv_public_kw, and rb_yield_splat_kw. This functions are necessary to easily handle cases where rb_funcall_passing_block, rb_funcallv_public, and rb_yield_splat are currently used and a keyword argument separation warning is raised.
* Suppress keyword argument warning from #stepNobuyoshi Nakada2019-09-301-0/+8
| | | | | | * numeric.c (num_step): pass the extracted argument from keyword argument, not the last argument itself which should have been warned already.
* Fix warning when doing Struct.new(:x, keyword_init: true){}Jeremy Evans2019-09-271-0/+10
| | | | | | | | | | This is due to calling rb_mod_module_eval directly instead of using rb_funcall_passing_block. The problem with calling directly is it does not create a new VM frame, so rb_mod_module_eval was called with no arguments, but with the keyword given VM frame flag set, which causes problems internally.
* Correctly issue ArgumentError when calling method that accepts no keywordsJeremy Evans2019-09-271-0/+13
| | | | | | | If a method accepts no keywords and was called with a keyword, an ArgumentError was not always issued previously. Force methods that accept no keywords to go through setup_parameters_complex so that an ArgumentError is raised if keywords are provided.
* Fix fallback in URI.encode_www_form_component to include #Jeremy Evans2019-09-271-0/+2
| | | | | | Patch from Matthew Kerwin. Fixes [Bug #14358]
* Do not escape + in Shellwords.escapeJeremy Evans2019-09-271-0/+5
| | | | | | + is not a character that requires escaping in Bourne sh. Fixes [Bug #14429]
* Ignore Errno::EPIPE when sending requests in net/httpJeremy Evans2019-09-271-0/+11
| | | | | | | | An EPIPE when sending the request should be ignored. Even if you cannot write more data, you may still be able to read the server's response. Fixes [Bug #14466]
* Drop eliminated catch-entriesNobuyoshi Nakada2019-09-271-0/+15
| | | | | Drop catch table entries used in eliminated block, as well as call_infos. [Bug #16184]
* More tests for [Feature #16150]Nobuyoshi Nakada2019-09-271-0/+21
|
* [ruby/fileutils] Fix test_cp_r_dev on Windows or other systems without ↵Jeremy Evans2019-09-271-4/+4
| | | | | | | | | | | | | character/block device in /dev Previously this would give an error such as: TestFileUtils#test_cp_r_dev [c:/fileutils/test/fileutils/test_fileutils.rb:455]: [RuntimeError] exception expected, not. Class: <TypeError> Message: <"no implicit conversion of nil into String"> https://github.com/ruby/fileutils/commit/0ce0fefbeb
* [ruby/fileutils] Do not break in verbose mode if using FileUtils with a ↵Jeremy Evans2019-09-271-0/+24
| | | | | | | | | | | | | frozen object If FileUtils is included into another object, and verbose mode is used, a FrozenError is currently raised unless the object has the @fileutils_output and @fileutils_label instance variables. This fixes things so that it does not attempt to set the instance variables, but it still uses them if they are present. https://github.com/ruby/fileutils/commit/689cb9c56a
* [ruby/fileutils] Skip test_cp_r_socket on JRubyJeremy Evans2019-09-271-0/+1
| | | | https://github.com/ruby/fileutils/commit/20bb9ec789
* [ruby/fileutils] Make copy methods handle FIFOs and UNIX socketsJeremy Evans2019-09-271-0/+28
| | | | | | | | | | | | | | | | | | Previously, this was broken. Trying to copy a FIFO would raise a NoMethodError if File.mkfifo was defined. Trying to copy a UNIX socket would raise a RuntimeError as File.mknod is not something Ruby defines. Handle the FIFO issue using File.mkfifo instead of mkfifo. Handle the UNIX Socket issue by creating a unix socket. Continue to not support character or block devices, raising a RuntimeError for both. Add tests for FIFO, UNIX Socket, and character/block devices. https://github.com/ruby/fileutils/commit/123903532d
* Fix more keyword separation issuesJeremy Evans2019-09-262-9/+651
| | | | | | | | | | | | | | | | | | | | | This fixes instance_exec and similar methods. It also fixes Enumerator::Yielder#yield, rb_yield_block, and a couple of cases with Proc#{<<,>>}. This support requires the addition of rb_yield_values_kw, similar to rb_yield_values2, for passing the keyword flag. Unlike earlier attempts at this, this does not modify the rb_block_call_func type or add a separate function type. The functions of type rb_block_call_func are called by Ruby with a separate VM frame, and we can get the keyword flag information from the VM frame flags, so it doesn't need to be passed as a function argument. These changes require the following VM functions accept a keyword flag: * vm_yield_with_cref * vm_yield * vm_yield_with_block
* Add compaction support to `rb_ast_t`Aaron Patterson2019-09-261-0/+14
| | | | This commit adds compaction support to `rb_ast_t`.
* Fix keyword argument separation issues in Enumerator::Generator#eachJeremy Evans2019-09-261-0/+77
| | | | This requires adding rb_proc_call_kw to pass the keyword flag.
* Honor Syslog::Logger#level overridesGeorge Claghorn2019-09-261-0/+15
|
* Kernel#open may be redefinedNobuyoshi Nakada2019-09-271-2/+13
|
* Fix keyword argument separation issues in Fiber#resumeJeremy Evans2019-09-261-0/+77
|
* Fix keyword argument separation issues in Thread.newJeremy Evans2019-09-261-0/+80
|
* Fix more keyword argument separation issues in PathnameJeremy Evans2019-09-261-0/+32
|
* Fix keyword argument separation issues in ↵Jeremy Evans2019-09-261-0/+15
| | | | | | | | | OpenSSL::SSL::SSLSocket#sys{read,write}_nonblock It's unlikely anyone would actually hit these. The methods are private, you only hit this code path if calling these methods before performing the SSL connection, and there is already a verbose warning issued.