Граф коммитов

7088 Коммитов

Автор SHA1 Сообщение Дата
aycabta df6a673ca5 Fix vertical cursor moving when splitting line 2019-05-21 08:10:36 +09:00
aycabta 34d7ec4e9b Finish only when buffer contains non-blank line 2019-05-21 01:50:07 +09:00
aycabta b69dfdb4b3 Cursor up should reduce 1 than editing height 2019-05-21 01:49:27 +09:00
aycabta 6592f5fcc8 Check bytesize in vi command mode last char back 2019-05-21 01:10:09 +09:00
aycabta 9f49ff4965 Cursor can't move to eol when vi command mode 2019-05-20 07:50:14 +09:00
aycabta 075e1acb4c Readline.completion_proc accepts US-ASCII 2019-05-20 04:47:58 +09:00
aycabta 16917cc3cb Add Reline.test_mode to use with special I/O 2019-05-18 12:48:27 +09:00
Nobuyoshi Nakada c9b28fd7ae
Allow --enable/--disable options to take an argument
[Bug #15850]
2019-05-15 17:31:11 +09:00
aycabta f54aa6c5b2 Rename confuzed name Reline::IO with Reline::IOGate 2019-05-15 15:52:18 +09:00
aycabta b5a3ec7f18 Remove useless use of a variable in Reline::ANSI 2019-05-14 17:15:49 +09:00
aycabta 1e65196b54 Check encoding when Readline completion 2019-05-14 14:53:34 +09:00
aycabta 602ef62ae6 Rescue CompatibilityError for Readline's completion 2019-05-14 14:11:28 +09:00
Urabe, Shyouhei 5bab1304af fix visibility of SecureRandom.gen_random
Aliasing a method preserves its visibility.  These aliases turn
formerly-public methods into private.  Should make them public
again.  [Bug #15847]
2019-05-14 11:44:20 +09:00
aycabta af1f3f131f Readline's class vars should be encoded as default_external 2019-05-14 07:15:41 +09:00
aycabta 741321704f Remove unused variable in LineEditor 2019-05-14 07:12:59 +09:00
Étienne Barrié 2dc613815d
delegate.rb: don't look for methods on Kernel
Instead, look for instance methods of Kernel.
Otherwise, instance methods of Module (which are methods of Kernel
itself) are mistakenly believed to exist, and it fails when calling
Kernel.instance_method().

Closes: https://github.com/ruby/ruby/pull/1422
2019-05-13 11:29:42 +09:00
aycabta caef2ddaaf Implement Reline::HISTORY as an expanded Array 2019-05-13 03:26:10 +09:00
aycabta c48778d642 Add attr_accessor for Reline's Config attrs 2019-05-13 03:24:15 +09:00
aycabta ebb15cc6c1 Reline.completion_proc= should raise ArgumentError
When the value is not Proc.
2019-05-13 02:33:29 +09:00
aycabta 130ced9fb0 Reline.completion_append_character= should be nil
When unknown value comes.
2019-05-13 02:31:42 +09:00
aycabta e467f920a3 Add Reline.special_prefixes as stub 2019-05-13 02:30:53 +09:00
aycabta 5837290af1 Implement Reline's class methods for compatibility
- insert_text
- redisplay
- line_buffer
- point
- point=
- vi_editing_mode
- emacs_editing_mode
- vi_editing_mode?
- emacs_editing_mode?
- get_screen_size
2019-05-13 02:26:31 +09:00
aycabta c137f015ab Add Reline.pre_input_hook interface 2019-05-13 02:20:20 +09:00
aycabta 9cb821b024 Implement Reline.input= and Reline.output= 2019-05-13 02:14:48 +09:00
aycabta bb56b89900 Add ed_search_prev_history to Reline 2019-05-13 01:51:05 +09:00
aycabta 0f45bd0584 Split namespace of env-dependent I/O classes 2019-05-13 00:22:27 +09:00
aycabta 11476e9902 Check INPUTRC env in Reline::Config 2019-05-12 23:21:41 +09:00
aycabta aaaede8bcf Change LineEditor instance in Reline to class var 2019-05-12 21:22:04 +09:00
Nobuyoshi Nakada dbcc224f38
Removed old names of internal methods 2019-05-10 14:13:17 +09:00
Nobuyoshi Nakada a7b68e63c5
Suppress a warning in Psych&YAML with verbose mode 2019-05-10 14:12:51 +09:00
Kazuhiro NISHIYAMA c8a891d1aa
Fix missing `\A` 2019-05-10 12:21:43 +09:00
Nobuyoshi Nakada c54d5872fb
Configure directories for headers and libraries automatically
[EXPERIMENTAL]
2019-05-08 17:00:12 +09:00
Kazuhiro NISHIYAMA d56b0cb554
Use `start_with?(quoted)` instead of `[0] == char literal` 2019-05-08 11:16:23 +09:00
Hiroshi SHIBATA efda52ba62
Use cgit instead of svn. 2019-05-07 23:31:03 +09:00
Nobuyoshi Nakada 7e72ce0f73
Load OptionParser defaults from XDG and Haiku standards 2019-05-06 15:30:44 +09:00
git 7d30cd47c4 * remove trailing spaces. 2019-05-04 19:29:14 +09:00
Masatoshi SEKI 8980b53a48 add DRb::WeakIdConv (Bug #15711) 2019-05-04 19:28:57 +09:00
aycabta 3de03544ff Add Reline.delete_text that raises NotImplementedError 2019-05-01 00:45:54 +09:00
aycabta 94b740b249 Use Ripper for IRB
The debug option of IRB is deleted because it's just for IRB's pure Ruby
parser.
2019-04-30 14:40:06 +09:00
aycabta 3be5907e73 Move Win32API to Reline::Win32API 2019-04-30 12:53:20 +09:00
aycabta 17350c7e55 Add Reline as a fallback library for Readline
* lib/reine.rb, lib/reline/*: Reline is a readline stdlib compatible
  library.
* lib/readline.rb: Readline uses a fallback to Reline when ext/readline
  doesn't exist.
* tool/sync_default_gems.rb: add ruby/reline as a default gem.
* appveyor.yml: add "set RELINE_TEST_ENCODING=Windows-31J" for test suit
  of Reline, and add "--exclude readline" to "nmake test-all" on Visual
  Studio builds because of strange behavior.
* spec/ruby/library/readline/spec_helper.rb: skip Reline as with
  RbReadline.
2019-04-30 11:44:20 +09:00
Takashi Kokubun f2d7ba6a74
make sync-default-gems GEM=irb
from e8e79d569e.

This colorizes Range object on IRB inspect.
2019-04-28 21:51:37 +09:00
Takashi Kokubun 588f212c26
make sync-default-gems GEM=irb
from 44301d3827.

This includes some fixes for string interpolation highlight fixes.
2019-04-28 20:18:45 +09:00
David Rodríguez d0a5467320 Update rubygems with latest upstream changes
Closes: https://github.com/ruby/ruby/pull/2154
2019-04-28 11:07:45 +09:00
Takashi Kokubun cae0b73214
make sync-default-gems GEM=irb
from 89e9add06d.

This adds syntax highlight support for Module on inspect.

In addition to that, I'm adding a trailing space in test_color.rb for
testing ruby-commit-hook's auto-style.
2019-04-28 02:01:04 +09:00
Takashi Kokubun 9348643575
make sync-default-gems GEM=irb
Synced from 5feb361ed8.
This includes a support to colorize named Class instance on IRB inspect.
2019-04-27 22:01:11 +09:00
Takashi Kokubun 569c1ef6f1
make sync-default-gems GEM=irb
Backport changes from ruby/irb.
2019-04-27 11:42:40 +09:00
naruse c8b675adb9
suppress redefinition warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-27 09:17:24 +09:00
nobu 8990779d36
Prefer block_given? to iterator?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-27 09:15:49 +09:00
Nobuyoshi Nakada e804fcb42c
Fix rdoc in 52cfb17086 2019-04-26 18:54:10 +09:00
Takashi Kokubun a429b3601f
Revert "Class instance should be also colorable on IRB"
This reverts commit 6669c966d2.

It seems to make tests fail... let me fix this later.
2019-04-26 18:46:43 +09:00
Takashi Kokubun 6669c966d2
Class instance should be also colorable on IRB
inspect.

Change is made with: `$ make -C .ruby sync-default-gems GEM=irb`
2019-04-26 18:42:51 +09:00
Takashi Kokubun 52cfb17086
make sync-default-gems GEM=irb
from e6739d8c66
2019-04-26 18:28:57 +09:00
Takashi Kokubun 0408b8b390
Syntax-highlight yield in IRB 2019-04-26 01:43:14 +09:00
Takashi Kokubun 5fe99aefd3
Support highlighting Regexp in inspect 2019-04-26 01:15:30 +09:00
Pocket7878 022cbb278f
Do not color IRB output on 'dumb' TERM
Co-Authored-By: k0kubun <takashikkbn@gmail.com>
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-26 00:47:42 +09:00
Takashi Kokubun b55201dd09
Colorize IRB's inspect result
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-26 00:47:40 +09:00
Takashi Kokubun 94af6cd383
Colorize IRB's code_around_binding
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-26 00:47:39 +09:00
Nobuyoshi Nakada f4f66bd11c
Revert "IRB is improved with Reline and RDoc, take 2"
Accidentally merged when 89271d4a37
"Adjusted indents".
2019-04-23 21:55:29 +09:00
aycabta f2cd4f4cd0
IRB is improved with Reline and RDoc, take 2 2019-04-23 20:08:02 +09:00
aycabta 51cec00953 Revert "IRB is improved with Reline and RDoc"
This reverts commit 7f273ac6d0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 09:13:49 +00:00
naruse 9a83922b66 suppress redefinition warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 05:48:35 +00:00
aycabta 7f273ac6d0 IRB is improved with Reline and RDoc
Reline is a readline stdlib compatible library. It also supports
multiline input. IRB is improved with Reline and supports multiline.
Besides, supports showing documents when completed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-20 08:51:20 +00:00
ktsj 9738f96fcf Introduce pattern matching [EXPERIMENTAL]
[ruby-core:87945] [Feature #14912]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-17 06:48:03 +00:00
knu 246723a34c Support SNI (Reapplying r67488)
This fixes connecting using TLS 1.3 to imap.gmail.com

[Fix GH-2077] [Feature #15594]

From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-15 10:52:34 +00:00
kou e3b6c7c7eb Import CSV 3.0.8
This includes performance improvements and backward incompatibility
fixes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 21:01:51 +00:00
marcandre 816c5323fe OpenStruct: improve error message when passing wrong number of arguments.
Patch by Lisa Ugray (issue #15515)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 13:47:24 +00:00
hsbt 68ddd4d300 Merge Bundler 2.1.0.pre.1 as developed version from upstream.
a53709556b

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 06:01:35 +00:00
kazu 25c1fd3b90 Reverting all commits from r67479 to r67496 because of CI failures
Because hard to specify commits related to r67479 only.
So please commit again.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-10 09:15:21 +00:00
shugo e553d94f01 Support SNI
This fixes connecting using TLS 1.3 to imap.gmail.com

[Fix GH-2077] [Feature #15594]

From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-09 23:35:02 +00:00
duerst 7fe64d17d3 update to Unicode Version 12.1.0 (beta)
Unicode Version 12.1.0 adds one single character, U+32FF SQUARE ERA NAME REIWA,
for the new Japanese era starting on May 1st. 12.1.0 will be finalized only on
May 7th, so we go with the beta version because further changes in the data we
need are highly unlikely, and we want to make sure Ruby is ready for the new era.

* common.mk: change UNICODE_VERSION to 12.1.0, UNICODE_BETA to YES

* enc/unicode/12.1.0, enc/unicode/12.1.0/casefold.h, enc/unicode/12.1.0/name2ctype.h:
  add directory and generated data files for new version

* lib/unicode_normalize/tables.rb: update for new character

* test/ruby/test_regexp.rb: add test for character property age=12.1

* test/test_unicode_normalize.rb: add test for NFKC decomposition of new character

This (mostly) completes issue #15195.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 00:58:51 +00:00
duerst c604219e8d change lib/unicode_normalize/tables.rb to single item per line to make diffs shorter
* template/unicode_norm_gen.tmpl: Change formatting of output to produce only a
  single item (or range) for each line to make future diffs shorter and easier
  to understand and check.

* lib/unicode_normalize/tables.rb: output of the above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04 23:40:48 +00:00
hsbt f28be7e02d Merge rubygems/rubygems from upstream.
The current master branch is
  97b264f0fa

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 11:48:18 +00:00
nobu 19e672cce9 rdoc: Colorize background of code/pre [ci skip]
Borrowed the style of code/pre from bugs.ruby-lang.org.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-30 12:39:35 +00:00
nobu fa04b87af4 [DOC] fix missing paren [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-28 08:39:24 +00:00
nobu b3507bf147 erb.rb: prohibit marshaling [EXPERIMENTAL]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-28 03:46:48 +00:00
hsbt 191b99c89d Merge fileutils-1.2.0 from ruby/fileutils.
It includes the following updates:

  * https://github.com/ruby/fileutils/pull/26
  * https://github.com/ruby/fileutils/pull/27
  * https://github.com/ruby/fileutils/pull/29
  * https://github.com/ruby/fileutils/pull/34

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-27 08:26:09 +00:00
hsbt bc76d8a232 Removed from standard library. No one maintains it from Ruby 2.0.0.
[Bug #15652][ruby-core:91736]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-11 11:37:17 +00:00
hsbt 7d3d8e79fe fall back to copy + unlink on EPERM
[Feature #15415][ruby-core:90536]

  Co-authored-by: Eric Wong  <normalperson@yhbt.net>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-11 09:52:31 +00:00
nobu 7d9664953b Removed circular require
Import rubygems/rubygems#2679

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-11 03:53:33 +00:00
hsbt 4c1952f4bf Ignore to handle the different platform
When `GEM_HOME` was shared with CRuby and JRuby. RubyGems try to
  handle both platforms. It should be ignored the different platform.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-07 11:24:48 +00:00
duerst cff7eefa07 update Unicode version (and Emoji version) to 12.0.0
- common.mk: set UNICODE_VERSION and UNICODE_EMOJI_VERSION to 12.0.0

- lib/unicode_normalize/tables.rb: update table data to Unicode version 12.0.0

- enc/unicode/12.0.0/casefold.h, enc/unicode/12.0.0/name2ctype.h: add generated
  files for Unicode version 12.0.0

This is the main commit for #15321.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-06 01:55:19 +00:00
hsbt 08f8cfe14e Merge RubyGems upstream: 56c0bbb69e4506bda7ef7f447dfec5db820df20b
It fixed the multiple vulnerabilities.
  https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-05 03:32:58 +00:00
hsbt d04963501b Use ENV["BUNDLE_GEM"] instead of gem command provided by system ruby.
It break the examples of bundler. Because some examples detect the
  different version of system ruby than test target version like trunk.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-18 13:33:25 +00:00
hsbt bef0c0a367 Fixup r66984. It breakes bundler's examples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-18 09:53:13 +00:00
hsbt 4ae3df42f7 Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c
This version contains the some style changes by RuboCop.

    * 9d810be0ed
    * 61ea98a727
    * 795893dce3
    * 9be7858f7f

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-14 12:59:03 +00:00
nobu 3d1c86a26f Removed moving toplevel header since r12501
Moving public headers was 12-years ago, no depend files would
expect ruby.h in the top source directory now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 02:46:22 +00:00
headius e6f8382a76 Replace outdated blockless proc call with block argument syntax
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-07 17:29:16 +00:00
hsbt 0fadb48498 Ignore to add bundler lib direcotry if it is same as rubylibdir.
[Bug #15469][ruby-core:90742]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-05 04:58:46 +00:00
nobu 33d026034e rdoc.css: make label-list compact
"Labeled Lists" section in lib/rdoc/markup.rb states labeled-list
will be formatted in same lines.

```
Notice that blank lines right after the label are ignored in labeled lists:

  [one]

      definition 1

  [two]

      definition 2

produces the same output as

  [one]  definition 1
  [two]  definition 2
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-02 06:54:55 +00:00
hsbt 7c9771be02 Fixed gemspec location of bundler.
FileCollector of rbinstall.rb requires location of gemspec under
  the sub-direcotry with the same name as default gems.

  I forgot to fix it with r66867.

  [Bug #15582][ruby-core:91374]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-01 13:41:56 +00:00
nobu cb5a329814 Fix exception namespace
* lib/fileutils.rb (remove_entry_secure): EISDIR is under the
  Errno namespace.  [ruby-core:91362] [Bug #15577]

From: Tietew (Toru Iwase) <tietew@tietew.net>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31 14:02:30 +00:00
kou 24b57b102c Upgrade CSV to 3.0.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-25 06:49:59 +00:00
kou cee0c36a08 Upgrade RSS to 0.2.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-25 06:35:04 +00:00
nobu 1fae154c07 tmpdir.rb: permission of user given directory
* lib/tmpdir.rb (Dir.mktmpdir): check if the permission of the
  parent directory only when using the default temporary
  directory, and no check against user given directory.  the
  security is the user's responsibility in that case.
  [ruby-core:91216] [Bug #15555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-23 06:06:47 +00:00
hsbt 3dc6efbe9c Merge rubygems master targeted RubyGems 3.1.0.
1172320540

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-22 06:28:04 +00:00
glass 9065336909 * lib/net/http.rb: handle Errno::ETIMEDOUT in Net::HTTP#transport_request
A patch from casperisfine (Jean byroot Boussier).
  [Fix GH-2012]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 06:23:55 +00:00
stomar f284eb3d54 lib/securerandom.rb: [DOC] small grammar fixes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 15:06:11 +00:00
kazu afd68cd871 raise FrozenError instead of RuntimeError
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 04:44:25 +00:00
nobu 141ed2f640 [DOC] Refactors documentation for `Forwardable`
[ruby-core:71281] [Misc #11639]

From: Sam Morgan <s_morgan@me.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20 04:38:52 +00:00
nobu c20aae965e Prefer block_given? to iterator?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 09:52:50 +00:00
nobu edb65a6254 rdoc: ignore gemspec files
[ruby-core:91067] [Bug #15531]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-13 13:49:25 +00:00
nobu 0fb782ea28 rdoc: ignore garbage files
* lib/rdoc/options.rb (RDoc::Options#init_ivars): exclude backup
  files by default.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-13 13:16:56 +00:00
nobu 6d18187371 Fix remaining syntax errors in Binding#irb docs
Apologies for catching those so late.

[Fix GH-2067] [ci skip]

From: Olivier Lacan <hi@olivierlacan.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-13 03:27:16 +00:00
nobu 9f1fb0a17f proc.c: proc without block
* proc.c (proc_new): promoted lambda/proc/Proc.new with no block
  in a method called with a block to a warning/error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 08:19:14 +00:00
nobu 6629588aa5 Fix mday overflow
[ruby-core:90897] [Bug #15506]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-06 04:36:56 +00:00
hsbt e97741e12a Merge Bundler 2.0.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 13:10:58 +00:00
nobu 79aef1272e [DOC] escape descriptions [ci skip]
Escape descriptions not to get parsed as directives.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:49:32 +00:00
nobu 9035e73a14 [DOC] mark function names [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:41:13 +00:00
nobu 8513c20370 [DOC] split a tag for each function name [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:25:32 +00:00
kazu 44aaff6d31 [DOC] Fix close tags [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 09:10:10 +00:00
hsbt 6e7213f427 Merge rubygems-3.0.2.
https://blog.rubygems.org/2019/01/01/3.0.2-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-01 04:53:52 +00:00
glass c5e8627f65 Revert "lib/net/http.rb: use connect_timeout instead of Timeout"
This reverts commit 69a1db96fe.
getaddrinfo(3) doesn't support timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-31 01:09:30 +00:00
glass 69a1db96fe lib/net/http.rb: use connect_timeout instead of Timeout
lib/net/pop.rb: ditto

lib/net/ftp.rb: ditto

lib/net/smtp.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-31 00:46:07 +00:00
sorah 6b861342b9 Unset SOURCE_DATE_EPOCH on Rubygems test cases
Relates to r66554. When test suites run with SOURCE_DATE_EPOCH, several
tests would fail.  Environment Variables are already kept with this
setup & teardown phase.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-30 03:15:58 +00:00
k0kubun 1ae3e6f3ce erb.rb: increase warn level only when non-zero safe_level
is given.

This is merging Eric's patch in [Bug #15479] to Ruby 2.6's behavior in r66631.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29 07:26:22 +00:00
k0kubun c02f036090 Revert "erb.rb: print deprecation warning with warn level 1"
This reverts commit b5569b9ab2.

The deprecation is indefinitely postponed.

[Bug #15478]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29 07:11:38 +00:00
akr b7c2ca7a32 [DOC] SecureRandom is extended by Random::Formatter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27 12:42:45 +00:00
shyouhei bc64df876e delete emacs mode lines [ci skip]
These settings are now covered by .dir-locals.el.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27 06:12:09 +00:00
nobu 1680a13a92 Fix Net::Protocol::BufferedIO#write when sending large multi-byte string
This commit should fix Net::Protocol::BufferedIO#write when sending
large multi-byte string like following example.

```
$ ruby -rnet/http -rjson -v -e "Net::HTTP.post(URI('http://httpbin.org/post'), { text: 'あ'*100_000 }.to_json, 'Content-Type' => 'application/json')"
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
Traceback (most recent call last):
        19: from -e:1:in `<main>'
        18: from lib/ruby/2.6.0/net/http.rb:500:in `post'
        17: from lib/ruby/2.6.0/net/http.rb:605:in `start'
        16: from lib/ruby/2.6.0/net/http.rb:920:in `start'
        15: from lib/ruby/2.6.0/net/http.rb:502:in `block in post'
        14: from lib/ruby/2.6.0/net/http.rb:1281:in `post'
        13: from lib/ruby/2.6.0/net/http.rb:1493:in `send_entity'
        12: from lib/ruby/2.6.0/net/http.rb:1479:in `request'
        11: from lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'
        10: from lib/ruby/2.6.0/net/http.rb:1506:in `catch'
         9: from lib/ruby/2.6.0/net/http.rb:1507:in `block in transport_request'
         8: from lib/ruby/2.6.0/net/http/generic_request.rb:123:in `exec'
         7: from lib/ruby/2.6.0/net/http/generic_request.rb:189:in `send_request_with_body'
         6: from lib/ruby/2.6.0/net/protocol.rb:247:in `write'
         5: from lib/ruby/2.6.0/net/protocol.rb:265:in `writing'
         4: from lib/ruby/2.6.0/net/protocol.rb:248:in `block in write'
         3: from lib/ruby/2.6.0/net/protocol.rb:275:in `write0'
         2: from lib/ruby/2.6.0/net/protocol.rb:275:in `each_with_index'
         1: from lib/ruby/2.6.0/net/protocol.rb:275:in `each'
lib/ruby/2.6.0/net/protocol.rb:280:in `block in write0': undefined method `bytesize' for nil:NilClass (NoMethodError)
```

[Fix GH-2058]

From: Eito Katagiri <eitoball@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27 04:49:12 +00:00
k0kubun b5569b9ab2 erb.rb: print deprecation warning with warn level 1
This was planned to be removed in Ruby 2.7 at first, but I changed my
mind to just keep warning it in Ruby 2.7.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-25 13:57:28 +00:00
kou 04e0609a06 Import REXML 3.1.9
It restores removed REXML::Parsers::BaseParser::UNQME_STR.
Because it's used by kramdown.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-25 02:26:30 +00:00
aycabta 705eb9c110 Merge RDoc 6.1.0 from upstream
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-23 13:14:28 +00:00
kou e5d634260e Import CSV 3.0.2
This includes performance improvement especially writing. Writing is
about 2 times faster.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-23 07:00:35 +00:00
hsbt ae19a18996 Merge RubyGems 3.0.1 from rubygems/rubygems.
It fixed the issues of RubyGems 3.0.0.
  https://blog.rubygems.org/2018/12/23/3.0.1-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-23 00:20:49 +00:00
marcandre 1e30df6f77 ostruct.rb: Accept block for to_h [#15451].
Patch by Shuji Kobayashi.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-22 17:05:03 +00:00
kou 0d1abb904e rexml: upgrade to 3.1.8
See https://github.com/ruby/rexml/blob/master/NEWS.md for change summary.

Changes for spec/ has been reported: https://github.com/ruby/spec/pull/639


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 02:49:10 +00:00
normal 4038d0137f webrick: add the ability to override res, req creation
So that a customized HTTPServer subclass can use it's own
Request/Response classes.

To apply the override, make a subclass of WEBrick::HTTPServer
and override the
`create_request_and_response(with_webrick_config)` method. The
method should return an Array of [request, response].

To check whether the Server supports this method (i.e. when
using older versions of WEBrick when needing this
functionality), you can ask the server if it responds to the
method

    server.respond_to?(:create_request_and_response)

This is backportable.

[ruby-core:69604] [Feature #11266]

From: Julik Tarkhanov <me@julik.nl>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 11:08:05 +00:00
hsbt 92e726628e Merge RubyGems 3.0.0 from upstream.
https://blog.rubygems.org/2018/12/19/3.0.0-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 07:20:17 +00:00
hsbt b0f6781e2f Update metadata of Bundler 1.17.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 07:02:57 +00:00
hsbt 301ae01bb5 Bump version to 1.0.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-18 06:49:12 +00:00
knu ab364fb5a8 Import ipaddr 1.2.2
- Enable frozen_string_literal and do a bit of code cleanup


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-18 05:09:08 +00:00
nobu 13fd78c2e1 Enhance Tempfile docs [ci skip]
[ruby-core:90525] [Bug #15411]

From: zverok (Victor Shepelev) <zverok.offline@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-16 12:09:08 +00:00
naruse 6ecafe0c98 Move autoload to toplevel
So that classes which uses Net::HTTP with https can use OpenSSL
namespace for example exception classes like OpenSSL::SSL::SSLError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-14 09:44:20 +00:00
naruse 67f59eb4ab fix r66163
OpenSSL maybe aren't loaded in rubygems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-14 08:01:40 +00:00
nobu d11525728f No document of Tempfile::Remover [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-14 03:36:13 +00:00
hsbt dd046c59de Bump version to 1.3.0 same as the latest version of rubygems.org.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 09:40:06 +00:00
hsbt 0d674f530f Bump library version same as released version of rubygems.org
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 07:57:42 +00:00
hsbt e913ecfded Backport https://github.com/ruby/irb/pull/2
Fix and improve version string by @stomar

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 07:41:10 +00:00
hsbt 80762b9ffe Backport https://github.com/ruby/shell/pull/1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 07:34:16 +00:00
akr c8cb0565a1 open3.rb don't use keyword splat (**).
revert r43582, r49173 and r49177.

open3 arguments uses spawn-like keyword arguments.
Both symbol and integer keys are used.
```
Open3.capture2(*command, :in => IO::NULL, 3 => IO::NULL)
``

This style cannot be supported with keyword splat (**) since Ruby 2.6.
Because Ruby 2.6 prohibits symbol/non-symbol key hash separation.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 06:48:46 +00:00
nobu 241dced625 Disable tailcall optimization [Bug #15303]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 05:46:13 +00:00
hsbt 7f9bf068fc Merge rubygems@21f12a8 from upstream.
* [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions https://github.com/rubygems/rubygems/pull/2515
  * Fix broken symlink that points to ../* https://github.com/rubygems/rubygems/pull/2516

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 05:07:50 +00:00
hsbt 36d93e831b Merge Bundler 1.17.2 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 11:02:41 +00:00
hsbt 91533d9ab1 Downgrade Bundler 1.17.x from 2.0.0.
We have the platform issue on heroku:
    * https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305
    * https://github.com/heroku/heroku-buildpack-ruby/issues/833

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 03:07:37 +00:00
nobu f6e800dab0 ReFix r663197
Stringify after downcase, to restrict arguments.
[Bug#15394]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 00:36:46 +00:00
nobu 0bdc2287bc Fix r663197
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 00:05:53 +00:00
naruse 1bf066dcfa Preserve HTTP header key as string [Bug #15394]
to prevent send Host header twice accidentally.

From: Sangyong Sim <sangyong-sim@cookpad.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 23:54:14 +00:00
usa 5f91caceea Net::ReadTimeout and Net::WriteTimeout should tell the cause socket
* lib/net/protocol.rb (ReadTimeout, WriteTimeout): Net::ReadTimeout and Net::WriteTimeout should tell the cause socket
  [Feature #14832] [ruby-core:87440]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 07:11:18 +00:00
aycabta 18911e99d2 Merge RDoc 6.1.0.beta3 from upstream
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-08 17:39:52 +00:00
kazu 1eba8ecb66 lib/monitor.rb: prevent to initialize MonitorMixin twice
and allow to initialize again when obj.dup.

Suggested by Benoit Daloze.  [ruby-core:88504] [Feature #15000]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-05 09:07:54 +00:00
duerst 66a6073859 update to Unicode 11.0.0 (main step, not complete yet)
- common.mk: Change Unicode version to 11.0.0, and Emoji version to 11.0
- test/ruby/enc/test_emoji_breaks.rb: update hard-coded Emoji version
- enc/unicode/11.0.0, enc/unicode/11.0.0/casefold.h, enc/unicode/name2ctype.h:
  Add generated files. Files for Unicode 10.0.0 will be removed once we are
  sure 11.0.0 works.
- lib/unicode_normalize/tables.rb: Updated table.
- regparse.c: Almost completely reimplement grapheme cluster detection in
  function node_extended_grapheme_cluster().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-05 08:10:24 +00:00
hsbt cfa6c55347 Merge 2-0-stable branch from bundler/bundler.
It's release version of Bundler 2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-04 23:33:29 +00:00
kazu c01a5ee85e Use delete_prefix instead of `sub(/\Afixed-pattern/, '')`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-04 08:22:10 +00:00
hsbt a94cbf81e1 Merge rubygems master@221bdea
* Fixed https://github.com/rubygems/rubygems/pull/2506

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-04 08:00:57 +00:00
hsbt edbac1b986 Fixed test fails against OpenSSL 1.1.1.
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20181203T093003Z.fail.html.gz
  * https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20181203T090002Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 12:01:26 +00:00
normal fb0009cfdc drb: fix tests on Debian sid/unstable with OpenSSL 1.1.1a
OpenSSL complains abour our keys being small and weak :<
Make them big and strong with 2048-bit RSA keys and SHA256 digests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 04:51:13 +00:00
normal a063f71a7c webrick: fix tests on Debian sid/unstable with OpenSSL 1.1.1a
OpenSSL complains abour our keys being small and weak :<
Make them big and strong with 2048-bit RSA keys and SHA256 digests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 04:51:08 +00:00
kazu fb2be0b530 Remove `(nanosecond)` too [ci skip]
[Bug #15322]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 02:53:57 +00:00
okkez 66ec94d546 time.rb: remove the unsupported formatting options from the document [ci skip]
Time.strptime does not support %3N, %6N, and %9N.

close [Bug #15322]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 02:34:23 +00:00
mame 2c840bbfef lib/pp.rb (Range#pretty_print): support endless range
`pp(1..)` should print `"(1..)"` instead of `"(1..nil)"`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 01:39:45 +00:00
nobu afa685398e Refine RubyVM::AbstractSyntaxTree::Node#type
* ast.c (rb_ast_node_type): simplified to return a Symbol without
  "NODE_" prefix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 01:06:34 +00:00
nobu 87e1dd2982 Add RubyVM::AST#pretty_print
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03 00:24:38 +00:00
nobu a7f1bcb2d6 optarse.rb: mention multiple descriptions [ci skip]
[ruby-list:50718]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-02 12:50:19 +00:00
hsbt 7a46a3b941 Merge rubygems-3.0.0.beta3.
* [GSoC] Multi-factor feature for RubyGems https://github.com/rubygems/rubygems/pull/2369

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-01 11:01:00 +00:00
kazu d7e3043463 Remove unused variable in example code [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-29 09:22:13 +00:00
nobu 8ea6c92eb3 time.rb: Move documents and stop others
* lib/time.rb: Move method documents to each methods.  And stop
  documentation of the abstract and others, which were confusingly
  placed at the top of generated documents prior to the abstract
  in time.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-29 01:09:47 +00:00
nobu 2d67a3f4b1 Get rid of block-less Proc.new
* lib/optparse.rb (OptionParser::Switch#initialize): get rid of
  `Proc.new` without a block, which may be deprecated in the future.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28 06:12:58 +00:00
nobu b7fccecf1c Remove useless backslash
* lib/optparse.rb (OptionParser::Switch#compsys): remove useless
  backslash which just confuse ruby-mode.el.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28 06:12:57 +00:00
hsbt 5dbc6583c9 Merge rubygems upstream from 2c499655f2
https://github.com/rubygems/rubygems/pull/2493

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28 03:08:14 +00:00
shugo 6ec1720aa3 lib/monitor.rb: avoid race conditions by Thread.handle_interrupt
Suggested by Benoit Daloze.  [ruby-core:88502] [Bug #14998]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28 01:51:44 +00:00
hsbt 14f47deacc Removed redundant empty line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28 00:48:21 +00:00
hsbt fc9509bdd2 Merge bundler-2.0.0.pre.2 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-27 12:08:19 +00:00
aycabta 4beec66757 Merge rdoc-6.1.0.bata2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-27 07:02:36 +00:00
nobu 79f3b6b5cd Do not load rubygems when disabled
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 14:02:59 +00:00
k0kubun af6adb9982 lib/rubygems/indexer.rb: suppress random test-all error
by Bundler integration, like:
http://ci.rvm.jp/results/trunk-no-mjit@silicon-docker/1479769

This resurrects r65629 which was accidentally reverted by r65904.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 12:36:45 +00:00
mame f7e94df0d6 lib/rubygems: explicitly clarify the type for =~ matching
RubyGems is very indifferent for type.
This change is needed for removal of `Object#=~`.  [Feature #15231]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 07:13:53 +00:00
mame 0edc36b9f2 lib/rubygems/command.rb: remove meaningless code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 05:46:24 +00:00
mame 03cde6c805 lib/rdoc/markup/: Remove wrong call to `=~` against Array
`@res` is an Array, so `@res =~ /\n\z/` calls `Object#=~` which always
returns nil.
I guess it should be `@res.last =~ /\n\z/`, but the change causes test
failures.

This bug was found during work for removal of `Object#=~`.
[Feature #15231]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 05:32:50 +00:00
mame 7a635a7d12 lib/webrick: explicitly convert header values to a string
The values of @header are expected to be all strings;
WEBrick::HTTPResponse::[]=(key, val) explicitly converts the second
argument to a string and assigns it to @header hash.
However, there were some points in WEBrick internal code that assigns
non-String to @header.  This change fixes the issues.

The values are checked by `header_value =~ /\r\n/` in check_header.
The type confusion caused conflict with removal of `Object#=~`
[Feature #15231].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 05:29:45 +00:00
kazu 9e2acbca2a un.rb: add more options for httpd to help message [ci skip]
see r65965

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 02:31:46 +00:00
nobu 70751a240f un.rb: more options for httpd
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-25 03:36:09 +00:00
hsbt a943328194 Use stub executables generated by RubyGems istead of original executables.
It resolved the conflict issues when invoking `gem i rdoc` and the binstub
issues with Bundler and Rails.

  [Bug #5060][ruby-core:38257][Fix GH-2023]

  * https://github.com/rubygems/rubygems/pull/2338
  * https://github.com/heroku/heroku-buildpack-ruby/issues/829

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-25 01:20:00 +00:00
hsbt 5335ce0e06 Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop
    https://github.com/rubygems/rubygems/pull/2478
  * Enable Style/MultilineIfThen in Rubocop
    https://github.com/rubygems/rubygems/pull/2479
  * Fix required_ruby_version with prereleases and improve error message
    https://github.com/rubygems/rubygems/pull/2344
  * Fix bundler rubygems binstub not properly looking for bundler
    https://github.com/rubygems/rubygems/pull/2426

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 10:20:47 +00:00
shugo 0dfc5918ec revert r65822
Because mon_initialized may be used to re-initialize copied objects intentionally.

mon_initialize_spec.rb fails:

1)
MonitorMixin#mon_initialize can be called in initialize_copy to get a new Mutex and used with synchronize ERROR
ThreadError: already initialized
/home/shugo/src/ruby/lib/monitor.rb:255:in `mon_initialize'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:19:in `initialize_copy'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `initialize_dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `block (2 levels) in <top (required)>'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:4:in `<top (required)>'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:56:51 +00:00
shugo 8d68f422dc lib/monitor.rb: prevent to initialize MonitorMixin twice
Suggested by Benoit Daloze.  [ruby-core:88504] [Feature #15000]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:01:55 +00:00
hsbt 3ec3d7d943 Switch to 2-0-stable branch of bundler/bundler repository from our fork repository.
https://github.com/bundler/bundler/tree/2-0-stable

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 23:27:37 +00:00
k0kubun 8945eeda8f Fix syntax on Binding.irb documentation [ci skip]
There was incorrect backticks (`) instead of plus signs to denote method
references, and a typo.

[Fix GH-2016]

From: Olivier Lacan <hi@olivierlacan.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-14 21:04:57 +00:00
kazu bc7976f2c6 lib/irb.rb: fix up r65674
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-12 02:00:08 +00:00
k0kubun 623ecdace6 Document binding.irb on Binding [ci skip]
For some reason this very useful method was undocumented since it was added in
493e488974 which makes finding it in the docs
impossible before this change.

I've added a detailed example with sample code because it's one of the most
powerful tools to debug Ruby code and I believe very few people are aware of it
due to the lack of documentation.

[Fix GH-2010]

From: Olivier Lacan <hi@olivierlacan.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-12 00:55:34 +00:00
hsbt 8f4aa4fd2a Merge Bundler-2.0.0.pre1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-12 00:53:15 +00:00
k0kubun ab5a3db48e erb.rb: warn invalid trim_mode [Misc #15294]
From: Justin Collins <justin@presidentbeef.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-12 00:37:15 +00:00
nobu 6268098208 Make rubygems follow the upstream of psych
And merge psych again.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-11 00:20:27 +00:00
k0kubun c68d1c924c lib/rubygems/indexer.rb: suppress random test-all error
by bundler. Similar to r65613, but fixing this more carefully
because here is not just inside tests but inside rubygems code.
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1448239

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-08 06:19:36 +00:00
nobu 9b7d8947df Clear CC_WRAPPER in other than the toplevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07 16:51:19 +00:00
hsbt 37c08fad04 Dir.children is available since Feature #11302. FileUtils uses
Dir.each on an internal method encapsulated on a private class
`Entry_#entry`, having no '.' neither '..' entries would make
now superfluous a chained reject filtering.

This change can improve the performance of these FileUtils
methods when the provided path covers thousands of files or
directories:

- chmod_R
- chown_R
- remove_entry
- remove_entry_secure
- rm_r
- remove_dir
- copy_entry

Related: Feature #13896 https://bugs.ruby-lang.org/issues/13896

[Feature #14109][Fix GH-1754]

Co-Authored-By: esparta <esparta@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07 15:55:14 +00:00
kazu 972cf8c91e Fix up r65505 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-05 07:01:49 +00:00
sorah 8b8c374c45 Fix RubyGems extension build failure after r65470
Port of upstream patch https://github.com/rubygems/rubygems/pull/2457

Since r65470 (Upstream: https://github.com/rubygems/rubygems/pull/2441),
builds of extension gem had always failed under really_verbose mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-04 15:39:00 +00:00
hsbt 2fbbbba5bd Merge upstream changes from 2-0-stable branch of bundler/bundler.
* It update bundler 2 mode to bundler 3.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-04 01:14:48 +00:00
hsbt 67da45a1f3 Merge rubygems-3.0.0.beta2.
* It enabled `USE_BUNDLER_FOR_GEMDEPS` for using gemdeps of rubygems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-03 12:31:51 +00:00