aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Warn for URI.{,un}{escape,encode}, even if not in verbose modeJeremy Evans2019-09-271-2/+2
| | | | | | | | The verbose mode warning has been present for almost 10 years. If we ever plan to remove these methods, we should make the warning a regular deprecation warning so that people are aware. Implements [Feature #15961]
* Fix fallback in URI.encode_www_form_component to include #Jeremy Evans2019-09-271-1/+1
| | | | | | Patch from Matthew Kerwin. Fixes [Bug #14358]
* Do not escape + in Shellwords.escapeJeremy Evans2019-09-271-1/+1
| | | | | | + 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-1/+7
| | | | | | | | 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]
* [ruby/fileutils] Bump version to 1.3.0.Hiroshi SHIBATA2019-09-271-1/+1
| | | | https://github.com/ruby/fileutils/commit/ba3bd6fdfd
* [ruby/fileutils] Use Gemfile instead of ↵Hiroshi SHIBATA2019-09-271-2/+0
| | | | | | Gem::Specification#add_development_dependency. https://github.com/ruby/fileutils/commit/17a9de6d9b
* [ruby/fileutils] Reduce global variablesKazuhiro NISHIYAMA2019-09-271-8/+8
| | | | https://github.com/ruby/fileutils/commit/ba81f024cf
* [ruby/fileutils] Fix cp_r with symlink root on WindowsJeremy Evans2019-09-271-1/+5
| | | | | | | | | | Previously this would copy the symlink root as a symlink instead of creating a new root directory. This modifies the source to expand it using File.realpath before starting the copy. Fixes Ruby Bug 12123 https://github.com/ruby/fileutils/commit/7359cef359
* [ruby/fileutils] Do not break in verbose mode if using FileUtils with a ↵Jeremy Evans2019-09-271-12/+6
| | | | | | | | | | | | | 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] Make copy methods handle FIFOs and UNIX socketsJeremy Evans2019-09-271-9/+12
| | | | | | | | | | | | | | | | | | 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
* [ruby/fileutils] Update the documentation content and formattingzverok2019-09-271-74/+93
| | | | https://github.com/ruby/fileutils/commit/b701353c53
* Gem::Specification#to_ruby needs OpenSSLNobuyoshi Nakada2019-09-261-0/+1
|
* [rubygems/rubygems] Make sure our modifications to kernel.warn workDavid Rodríguez2019-09-261-0/+1
| | | | | | And test the fix we're adding. https://github.com/rubygems/rubygems/commit/6f86637b98
* [rubygems/rubygems] Fix jruby buildDavid Rodríguez2019-09-261-1/+5
| | | | https://github.com/rubygems/rubygems/commit/cc255b774a
* [rubygems/rubygems] filter dependency type and name strictly.Hiroshi SHIBATA2019-09-261-1/+5
| | | | | | Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> https://github.com/rubygems/rubygems/commit/92892bbc3a
* [rubygems/rubygems] Introduce default prerelease requirementDavid Rodríguez2019-09-263-3/+14
| | | | https://github.com/rubygems/rubygems/commit/506c5bce49
* [rubygems/rubygems] Remove comment not adding muchDavid Rodríguez2019-09-261-3/+0
| | | | https://github.com/rubygems/rubygems/commit/b3b5c2d379
* [rubygems/rubygems] add testsf2019-09-261-1/+1
| | | | https://github.com/rubygems/rubygems/commit/8a7e27381c
* [rubygems/rubygems] Detect libc version, closes #2918f2019-09-261-1/+1
| | | | https://github.com/rubygems/rubygems/commit/1d18b12a26
* [rubygems/rubygems] Fix underscore version for bundler itselfDavid Rodríguez2019-09-261-1/+1
| | | | | | Previously it wouldn't play nice with the bundler version finder. https://github.com/rubygems/rubygems/commit/d8bb81556d
* [rubygems/rubygems] Avoid adding OpenSSL::PKey::RSA instancesbronzdoc2019-09-261-4/+2
| | | | https://github.com/rubygems/rubygems/commit/ba021fb4be
* [rubygems/rubygems] Fix indentation in case statementbronzdoc2019-09-261-10/+10
| | | | https://github.com/rubygems/rubygems/commit/8ac0647659
* [rubygems/rubygems] Make ruby_code method handle OpenSSL::PKey::RSA objectsbronzdoc2019-09-261-0/+1
| | | | https://github.com/rubygems/rubygems/commit/b1d825ab3a
* [rubygems/rubygems] Set SOURCE_DATE_EPOCH env var if not provided.Ellen Marie Dash2019-09-264-6/+23
| | | | | | | | | | | | | Fixes #2290. 1. `Gem::Specification.date` returns SOURCE_DATE_EPOCH when defined, 2. this commit makes RubyGems set it _persistently_ when not provided. This combination means that you can build a gem, check the build time, and use that value to generate a new build -- and then verify they're the same. https://github.com/rubygems/rubygems/commit/d830d53f59
* [rubygems/rubygems] Add a gem attr to the Gem::Package class.Daniel Berger2019-09-261-0/+5
| | | | https://github.com/rubygems/rubygems/commit/5b81f364ae
* Add Module#ruby2_keywords for passing keywords through regular argument splatsJeremy Evans2019-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This approach uses a flag bit on the final hash object in the regular splat, as opposed to a previous approach that used a VM frame flag. The hash flag approach is less invasive, and handles some cases that the VM frame flag approach does not, such as saving the argument splat array and splatting it later: ruby2_keywords def foo(*args) @args = args bar end def bar baz(*@args) end def baz(*args, **kw) [args, kw] end foo(a:1) #=> [[], {a: 1}] foo({a: 1}, **{}) #=> [[{a: 1}], {}] foo({a: 1}) #=> 2.7: [[], {a: 1}] # and warning foo({a: 1}) #=> 3.0: [[{a: 1}], {}] It doesn't handle some cases that the VM frame flag handles, such as when the final hash object is replaced using Hash#merge, but those cases are probably less common and are unlikely to properly support keyword argument separation. Use ruby2_keywords to handle argument delegation in the delegate library.
* Make rb_scan_args handle keywords more similar to Ruby methods (#2460)Jeremy Evans2019-09-257-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cfuncs that use rb_scan_args with the : entry suffer similar keyword argument separation issues that Ruby methods suffer if the cfuncs accept optional or variable arguments. This makes the following changes to : handling. * Treats as **kw, prompting keyword argument separation warnings if called with a positional hash. * Do not look for an option hash if empty keywords are provided. For backwards compatibility, treat an empty keyword splat as a empty mandatory positional hash argument, but emit a a warning, as this behavior will be removed in Ruby 3. The argument number check needs to be moved lower so it can correctly handle an empty positional argument being added. * If the last argument is nil and it is necessary to treat it as an option hash in order to make sure all arguments are processed, continue to treat the last argument as the option hash. Emit a warning in this case, as this behavior will be removed in Ruby 3. * If splitting the keyword hash into two hashes, issue a warning, as we will not be splitting hashes in Ruby 3. * If the keyword argument is required to fill a mandatory positional argument, continue to do so, but emit a warning as this behavior will be going away in Ruby 3. * If keyword arguments are provided and the last argument is not a hash, that indicates something wrong. This can happen if a cfunc is calling rb_scan_args multiple times, and providing arguments that were not passed to it from Ruby. Callers need to switch to the new rb_scan_args_kw function, which allows passing of whether keywords were provided. This commit fixes all warnings caused by the changes above. It switches some function calls to *_kw versions with appropriate kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS is used. If creating new arguments, RB_PASS_KEYWORDS is used if the last argument is a hash to be treated as keywords. In open_key_args in io.c, use rb_scan_args_kw. In this case, the arguments provided come from another C function, not Ruby. The last argument may or may not be a hash, so we can't set keyword argument mode. However, if it is a hash, we don't want to warn when treating it as keywords. In Ruby files, make sure to appropriately use keyword splats or literal keywords when calling Cfuncs that now issue keyword argument separation warnings through rb_scan_args. Also, make sure not to pass nil in place of an option hash. Work around Kernel#warn warnings due to problems in the Rubygems override of the method. There is an open pull request to fix these issues in Rubygems, but part of the Rubygems tests for their override fail on ruby-head due to rb_scan_args not recognizing empty keyword splats, which this commit fixes. Implementation wise, adding rb_scan_args_kw is kind of a pain, because rb_scan_args takes a variable number of arguments. In order to not duplicate all the code, the function internals need to be split into two functions taking a va_list, and to avoid passing in a ton of arguments, a single struct argument is used to handle the variables previously local to the function.
* Get rid of `IO.select` to fix multiline pasteNobuyoshi Nakada2019-09-261-8/+1
|
* Use short wait for select(2)aycabta2019-09-231-2/+2
| | | | It is one of the reasons why paste to IRB is slow.
* Retrieve key-buffer that was supposed to loseaycabta2019-09-231-0/+10
|
* Removed ThreadsWait from the ruby repositoryHiroshi SHIBATA2019-09-203-169/+0
|
* Removed Synchronizer from the ruby repository.Hiroshi SHIBATA2019-09-202-355/+0
|
* Removed Shell from the ruby repository.Hiroshi SHIBATA2019-09-209-1965/+0
|
* Removed Scanf from the ruby repository.Hiroshi SHIBATA2019-09-202-800/+0
|
* Removed CMath from the ruby repository.Hiroshi SHIBATA2019-09-202-458/+0
|
* Added link_command for C++Nobuyoshi Nakada2019-09-191-0/+10
|
* Separate @have_devel for C++Nobuyoshi Nakada2019-09-191-0/+8
|
* Look up the language moduleNobuyoshi Nakada2019-09-191-1/+11
| | | | | | Look up language module with `MakeMakefile.[]`, insted of a accessing constant under that module directly, to get rid of expose the constant to the toplevel inadvertently.
* Removed MakeMakefile::CNobuyoshi Nakada2019-09-181-2/+0
| | | | It is exposed to the topleven namespace via included MakeMakefile.
* Removed a debug print [ci skip]Nobuyoshi Nakada2019-09-181-2/+0
|
* [EXPERIMENTAL] MakeMakefile::CXX for C++Nobuyoshi Nakada2019-09-181-7/+40
|
* [bundler/bundler] Merge #7340Bundlerbot2019-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 7340: Fix bundle clean issue r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that `bundle clean` is crashing under some conditions. ### What was your diagnosis of the problem? My diagnosis was that sometimes (when the bundle includes git sourced gems with extensions), it assumes that some paths exist, but they don't. ### What is your fix for the problem, implemented in this PR? My fix is to ignore those paths. ### Why did you choose this fix out of the possible options? I chose this fix because it fixes the issue. Fixes #7338. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit b007fde67c77c1f15f13b97eda186644c2a2be04) https://github.com/bundler/bundler/commit/3766053507
* [bundler/bundler] Fix remembered flag deprecation messageDavid Rodríguez2019-09-181-1/+1
| | | | | | It was suggested a deprecated command as a fix. https://github.com/bundler/bundler/commit/e330a9a34f
* [bundler/bundler] Version 2.1.0.pre.2David Rodríguez2019-09-181-1/+1
| | | | https://github.com/bundler/bundler/commit/6e9774b377
* [bundler/bundler] Revert "Add all platforms to lockfile by default"David Rodríguez2019-09-182-9/+1
| | | | | | This reverts commit 3dc509e645abb497e4dc92a7c42be471ff87db0b. https://github.com/bundler/bundler/commit/b5766564fb
* [bundler/bundler] Revert "Remove now meaningless warning"David Rodríguez2019-09-181-1/+11
| | | | | | This reverts commit 00b095b98fe4bd44950beaf3bc9f1d91eac7b69e. https://github.com/bundler/bundler/commit/e93bce3b20
* [bundler/bundler] Revert "Remove now meaningless setting"David Rodríguez2019-09-182-1/+2
| | | | | | This reverts commit 52c5a0eedec34b5d86464b3cf135dc2002486f1d. https://github.com/bundler/bundler/commit/b4cc36deb9
* [bundler/bundler] Revert "Remove now unused method"David Rodríguez2019-09-181-0/+4
| | | | | | This reverts commit 3a2d2f025081755bdb38af660897e7b2f749a33a. https://github.com/bundler/bundler/commit/13cef81582
* [bundler/bundler] Fix comments and messages to refer to https urlTakayuki Nakata2019-09-187-10/+10
| | | | https://github.com/bundler/bundler/commit/a86b49f1b9
* [bundler/bundler] Fix --path option descriptionsDavid Rodríguez2019-09-181-2/+2
| | | | | | To not mention that the flag is remembered when it's not. https://github.com/bundler/bundler/commit/82f0b95854