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

9176 Коммитов

Автор SHA1 Сообщение Дата
Yusuke Endoh 9438c99590 Rename error_squiggle to error_highlight 2021-06-29 23:45:49 +09:00
Yusuke Endoh e946049665 [WIP] add error_squiggle gem
```
$ ./local/bin/ruby -e '1.time {}'
-e:1:in `<main>': undefined method `time' for 1:Integer (NoMethodError)

1.time {}
 ^^^^^
Did you mean?  times
```

https://bugs.ruby-lang.org/issues/17930
2021-06-29 23:45:49 +09:00
Yusuke Endoh 809f120374 Use String#include? instead of end_with? to avoid message duplication
Previously, did_you_mean used `msg.end_with?(suggestion)` to check if
its suggestion is already added.

I'm now creating a gem that also modifies Exception's message. This
breaks did_you_mean's duplication check.
This change makes the check use String#include? instead of end_with?.

https://github.com/ruby/did_you_mean/commit/b35e030549
2021-06-29 15:49:51 +09:00
Yusuke Endoh 612b6fcd37 Let Correctable#original_message skip prepended method definitions
Previously, DidYouMean::Correctable#original_message did
`method(:to_s).super_method.call` to call the original to_s method by
skipping Correctable#to_s.

I'm now creating a gem that prepends another to_s method to NameError,
which confuses the hack. An immediate solution is to replace it with
`method(:to_s).super_method.super_method.call` to skip the two methods.
But it is too ad-hoc.

This changeset uses more extensible approach and allow a prepended
module to declare that they should be skipped by defining a constant
named `SKIP_TO_S_FOR_SUPER_LOOKUP`.

https://github.com/ruby/did_you_mean/commit/8352c154e3
2021-06-29 15:49:51 +09:00
Nobuyoshi Nakada 4670458af8 Should require "rbconfig" to use RbConfig
https://github.com/ruby/did_you_mean/commit/fbe5aaaae8
2021-06-29 15:49:51 +09:00
Yuki Nishijima 8356d9e374 Start v1.6.0 development
https://github.com/ruby/did_you_mean/commit/3f69171813
2021-06-29 15:49:51 +09:00
Nobuyoshi Nakada 9eae8cdefb
Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
Takashi Kokubun 35c7e83bb3 [ruby/irb] Optimize show_source command further
https://github.com/ruby/irb/pull/249 actually slowed down how `code` is
concatenated. The original way of creating `code` is faster.

[before]
    user     system      total        real
2.420137   0.005364   2.425501 (  2.426264)

[after]
    user     system      total        real
1.000221   0.007454   1.007675 (  1.008295)

Theoretically, this implementation might skip lines that don't appear in
Ripper tokens, but this assumes such lines don't impact whether the code
passes compilation or not. At least normal blank lines seem to have an
`on_ignored_nl` token anyway though.

https://github.com/ruby/irb/commit/27dd2867cd
2021-06-27 10:52:49 +09:00
Masataka Pocke Kuwabara 6eb7c663c6 [ruby/irb] Improve performance of `show_source` for large class
https://github.com/ruby/irb/commit/2b79e9ad21
2021-06-27 10:36:11 +09:00
Samuel Williams bf376cae0c [ruby/reline] Fix missing require.
https://github.com/ruby/reline/commit/010b28dfe9
2021-06-25 17:42:45 +09:00
Samuel Williams e788481843 [ruby/reline] Avoid using blocking `IO.select`.
https://github.com/ruby/reline/commit/de94746393
2021-06-25 17:42:45 +09:00
Hiroshi SHIBATA b048fd572a
Followed up 66d2fc7989 2021-06-25 17:27:17 +09:00
Aaron Patterson b036a44e57
[ruby/racc] Remove Object monkey patch
I don't think we need this monkey patch anymore, so lets remove it!

https://github.com/ruby/racc/commit/464485e912
2021-06-25 17:26:27 +09:00
Hiroshi SHIBATA 7641a83d1f
[ruby/racc] Removed needless condition for old versions of RubyGems.
https://github.com/ruby/racc/commit/fe3183b1ff
2021-06-25 17:26:27 +09:00
Hiroshi SHIBATA dd0a9507a2
[ruby/racc] Drop to support Ruby 2.4
https://github.com/ruby/racc/commit/5af1a42a3b
2021-06-25 17:26:27 +09:00
Hiroshi SHIBATA 77c1f6b1ec
[ruby/racc] Followed up #162
https://github.com/ruby/racc/commit/d66cd12166
2021-06-25 17:26:27 +09:00
Jean Boussier 71344a1d63 [ruby/racc] Stop compressing integer lists
It is unclear why this was implemented, I assume
it was for performance back in 2006.

However today, this compression defeats bytecode caching
entirely and end up being counter productive.

https://github.com/ruby/racc/commit/ae3703c1d0
2021-06-25 17:23:06 +09:00
Nobuyoshi Nakada 627aafac86
Remove also debug symbol directory at clean on macOS 2021-06-24 17:04:42 +09:00
Nobuyoshi Nakada 1356b90c91
Prefer configured command as RM_RF 2021-06-24 17:04:41 +09:00
Hiroshi SHIBATA 193eea9dcd [ruby/rdoc] Specify working directory for RDoc::Options#check_files
https://github.com/ruby/rdoc/commit/f6cca9bd2f
2021-06-23 11:05:16 +09:00
Keiko Kaneko de779f4a62 [ruby/irb] Sort ls result ordered by anscestry
https://github.com/ruby/irb/commit/fdd5c0a71e
2021-06-22 22:32:42 +09:00
aycabta 046fd3ac8c Rescue conversion error of inputrc 2021-06-21 22:12:14 +09:00
aycabta 30cc07fdc1 Check Ruby version to use Fiddle with variadic args in test-all 2021-06-21 18:44:10 +09:00
Ulysse Buonomo 5cc11845b2 [ruby/irb] Improve stackprof measure
Allow usage of more detailed args when setting stackprof callback.

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>

https://github.com/ruby/irb/commit/c9d101f450
2021-06-21 18:03:49 +09:00
aycabta 90df426426 [ruby/reline] Version 0.2.6
https://github.com/ruby/reline/commit/5917e3a337
2021-06-21 17:58:49 +09:00
aycabta 00b027a69b [ruby/reline] Fix explamation of #read_io
https://github.com/ruby/reline/commit/301ed11bec
2021-06-21 17:58:49 +09:00
aycabta 95a3cdade6 [ruby/reline] Remove FIXME comment in #render
https://github.com/ruby/reline/commit/acd8f8efbb
2021-06-21 17:58:49 +09:00
aycabta b06218ce6f [ruby/reline] Remove TODO comment in #render_partial
https://github.com/ruby/reline/commit/bb6ea232c2
2021-06-21 17:58:49 +09:00
aycabta 8135f489be [ruby/reline] Add binding C-x C-x to em_exchange_mark on Windows
https://github.com/ruby/reline/commit/24a2489b62
2021-06-21 17:58:49 +09:00
aycabta fa5a258e93 [ruby/reline] Treat C-Space as M-Space on Windows
https://github.com/ruby/reline/commit/69beca2863
2021-06-21 17:58:49 +09:00
aycabta 582b5705ab [ruby/reline] Check existance of a constant, Fiddle::VERSION
https://github.com/ruby/reline/commit/4b74c3d83a
2021-06-21 17:58:48 +09:00
aycabta 18b79b4c49 [ruby/reline] Add Meta+arrow-keys in extended entries of terminfo
https://github.com/ruby/reline/commit/af6f6ed088
2021-06-21 17:58:48 +09:00
aycabta 60d1d6aa89 [ruby/reline] Terminfo.tigetstr should be able to receive tiparm in method chain
https://github.com/ruby/reline/commit/4a3e308163
2021-06-21 17:58:48 +09:00
aycabta 5e09da2f7a [ruby/reline] Terminfo.tigetstr and tiparm should return String object
https://github.com/ruby/reline/commit/1e287d10cc
2021-06-21 17:58:48 +09:00
aycabta 46c813969b [ruby/reline] Add terminfo support
https://github.com/ruby/reline/commit/74a7ffaa2f
2021-06-21 17:58:48 +09:00
aycabta 1b543dc226 [ruby/reline] Handle Errno::ENOTTY correctly
https://github.com/ruby/reline/commit/8daa392ba6
2021-06-21 17:58:48 +09:00
Jeremy Evans 242bad9a87 [ruby/reline] Fix Reline::Unicode.calculate_width when input is not a TTY
This fixes an error when output is redirected:

```
$ run_ruby -rreline -e '$stderr.puts Reline::Unicode.calculate_width("\u221a").inspect' </dev/null >/dev/null
/home/jeremy/tmp/ruby/lib/reline/ansi.rb:189:in `raw': Operation not supported by device (Errno::ENODEV)
```

The @@encoding -> defined?(@@encoding) changes is necessary because
without that part of the commit, the following error would be raised
by the above command:

```
/home/jeremy/tmp/reline/lib/reline/general_io.rb:10:in `encoding': uninitialized class variable @@encoding in Reline::GeneralIO (NameError)
```

Problem reported and initial patch for Windows provided by
Richard Sharman.

I tested this only on OpenBSD, but hopefully it works for other
operating systems.

Fixes [Bug #17493]

https://github.com/ruby/reline/commit/c001971bb3
2021-06-21 17:58:48 +09:00
aycabta 26f31f880c [ruby/reline] Treat return key correctly on Windows
To fix Reline::TestRendering#test_binding_for_vi_movement_mode.

https://github.com/ruby/reline/commit/0df3d2a1dc
2021-06-21 17:58:48 +09:00
aycabta b0cc46b484 [ruby/reline] The config file must accept any character encoding
In Japan, so many programmers used EUC-JP to write text files that contain
Japanese. Many .inputrc files which contain EUC-JP are still being copied and
used. This commit supports the whole encoding of what user set including UTF-8.

ref. https://github.com/ruby/reline/pull/280

https://github.com/ruby/reline/commit/0b45022e16
2021-06-21 17:58:48 +09:00
aycabta c59bbd86a6 [ruby/reline] Use ReadConsoleInputW() instead of getwch()
This needs https://github.com/aycabta/yamatanooroti/pull/19, which is released
by yamatanooroti gem 0.0.7, to test with yamatanooroti.

https://github.com/ruby/reline/commit/06c1f45da1
2021-06-21 17:58:48 +09:00
Mark Delk a049dfd10a [ruby/reline] ensure reline's encoding is used when reading inputrc character values
This change ensures we use `Reline::IOGate`'s `encoding` when converting
characters from their integer values.

This fixes an issue that may occur if you have UTF characters in your
`.inputrc`, but your default encoding isn't set.

For example:

```
> 127864.ord.chr
RangeError: 127864 out of char range
from (pry):1:in `chr'
> Reline::IOGate.encoding
=> #<Encoding:UTF-8>
> 127864.ord.chr(Reline::IOGate.encoding)
=> "🍸"
```

https://github.com/ruby/reline/commit/cf372fc0fc
2021-06-21 17:58:48 +09:00
aycabta c2f30aaade [ruby/irb] Version 1.3.6
https://github.com/ruby/irb/commit/75aa8d159b
2021-06-21 17:35:46 +09:00
Nobuyoshi Nakada 2b17d2f297 [ruby/net-protocol] Get rid of `__send__`
Mitigate the security risk:
https://devcraft.io/2021/01/07/universal-deserialisation-gadget-for-ruby-2-x-3-x.html

https://github.com/ruby/net-protocol/commit/a9970437e8
2021-06-16 22:23:46 +09:00
Marc-Andre Lafortune f0818982e9 [ruby/ostruct] v0.4.0
https://github.com/ruby/ostruct/commit/8534f69e4e
2021-06-15 12:04:05 +09:00
Marc-Andre Lafortune 52369fc545 [lib/ostruct] Allow overriding of `block_given?` 2021-06-14 12:28:53 -04:00
Nobuyoshi Nakada 5dde13e5ce [ruby/ostruct] bump up
https://github.com/ruby/ostruct/commit/bb253be3e9
2021-06-14 23:31:49 +09:00
jfrazx 931ea7cfbe
Add fallback block to `OpenStruct#delete_field` (#1409) 2021-06-14 09:53:20 -04:00
aycabta 9137caaf45 [ruby/rdoc] Add a dependency on psych gem 4.0.0 or newer
https://github.com/ruby/rdoc/commit/ebe185c877
2021-06-02 11:35:45 +09:00
Hiroshi SHIBATA cd2190448d
[ruby/net-protocol] Bump version to 0.1.1
https://github.com/ruby/net-protocol/commit/97c4b68528
2021-05-31 17:40:07 +09:00
David Rodríguez 59c6820971 [rubygems/rubygems] Copy files specific to testing rubygems to `test`
https://github.com/rubygems/rubygems/commit/aa390a3500
2021-05-28 11:52:57 +09:00
Hiroshi SHIBATA f7d661e783
[rubygems/rubygems] Try fix ruby-core CI
* Port
8e91b969df
from ruby-core, and make it compatible with psych 3 & 4.
2021-05-28 11:52:32 +09:00
Hiroshi SHIBATA 350bc29107 Guard for the ftp protocol feature of OpenURI 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA be2e2b4805 Promote net-smtp to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA aa9726f7b9 Promote net-pop to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA d5bc6b2337 Promote net-imap to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA e49c998d1e Promote net-ftp to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA 454a36794f Promote matrix to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA c9178c1127 Promote prime to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA ab3266ea5c Removed tracer from ruby repo 2021-05-25 13:13:52 +09:00
Mark Delk b8ffb1c46f [ruby/irb] respect NO_COLOR environment variable
When `NO_COLOR` is set to any non-nil value, output is not colorized.

See https://no-color.org/

https://github.com/ruby/irb/commit/401d0916fe
2021-05-24 11:55:58 +09:00
aycabta c264d30261 Use YAML.safe_load to use the permitted_classes option 2021-05-21 21:45:03 +09:00
Nobuyoshi Nakada 59b327aa58
[ruby/rdoc] Drop support for Ruby 2.4
https://github.com/ruby/rdoc/commit/f480b970cc
2021-05-21 15:53:34 +09:00
Yusuke Endoh 21d24767e8
[ruby/rdoc] Update rdoc.gemspec by adding lib/rdoc/markup/table.rb
Fixes ruby/rdoc#808

https://github.com/ruby/rdoc/commit/80766fd389
2021-05-21 15:51:53 +09:00
aycabta 0ee24b4fab [ruby/rdoc] Version 6.3.1
https://github.com/ruby/rdoc/commit/9307f932b7
2021-05-21 13:42:24 +09:00
aycabta b1c73f239f [ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799
https://github.com/ruby/rdoc/commit/a7f5d6ab88
2021-05-21 13:42:24 +09:00
Hiroshi SHIBATA dfecc650c3
Workaround with fbb4e3f96c in yaml/store.rb 2021-05-17 12:57:41 +09:00
Yusuke Endoh ffdf0232ef lib/rdoc/rdoc.rb: Allow only RDoc::Options in .rdoc_options
Follow-up of d8fd92f620. Instead of using
unsafe_load blindly, RDoc::Options is only supposed to be allowed.
2021-05-17 12:53:42 +09:00
Hiroshi SHIBATA d8fd92f620
Workaround with fbb4e3f96c in rdoc 2021-05-17 12:04:40 +09:00
aycabta eef406acf4 [ruby/irb] IRB should use the latest Reline, 0.2.5
https://github.com/ruby/irb/commit/34496e20e8
2021-05-15 19:12:57 +09:00
Hiroshi SHIBATA b314885af0 [rubygems/rubygems] Update the link of minitest code with the commit hash.
https://github.com/rubygems/rubygems/commit/e7280f8d30
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 32d25660b9 [rubygems/rubygems] Removed the related code for minitest-bisect
https://github.com/rubygems/rubygems/commit/83ebdec27a
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 9620a30b1b [rubygems/rubygems] Fixed an intentional blank-line
https://github.com/rubygems/rubygems/commit/795b572ac2
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 655727ee1b [rubygems/rubygems] Added comment for Minitest::Mock
https://github.com/rubygems/rubygems/commit/ae44b68d57
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 129bc04ab7 [rubygems/rubygems] util/rubocop -a
https://github.com/rubygems/rubygems/commit/a10ff97830
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 3456335a9c [rubygems/rubygems] Removed minitest/mock from test/rubygems/test_gem_remote_fetcher.rb
https://github.com/rubygems/rubygems/commit/f1af59fe02
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA d5237c5d10 [rubygems/rubygems] Import capture_subprocess_io from minitest
https://github.com/rubygems/rubygems/commit/8b2ca6df3a
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA 3948be3503 [rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead of assert_path_exists and refute_path_exists
https://github.com/rubygems/rubygems/commit/a7c93558c3
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA cddeee21e9 [rubygems/rubygems] Use test-unit instead of minitest
https://github.com/rubygems/rubygems/commit/a8571524ad
2021-05-12 17:24:43 +09:00
Shugo Maeda 773c690f25 [ruby/net-ftp] Bump version to 0.1.2
https://github.com/ruby/net-ftp/commit/895ba44b3c
2021-05-12 09:20:41 +09:00
Koichi ITO c45f7556b5 [ruby/irb] Fix `Encoding::ConverterNotFoundError`
Follow https://github.com/ruby/irb/pull/237.

This PR fixes the following `Encoding::ConverterNotFoundError`.

```console
% bin/spring stop && bin/rails c
Spring stopped.
Running via Spring preloader in process 58395
Loading development environment (Rails 6.0.3.7)
irb(main):001:0> "こんにちは".do_something
Traceback (most recent call last):
(snip)

    12: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:547:in `eval_input'
    11: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:232:in `each_top_level_statement'
    10: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:232:in `catch'
     9: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:233:in  `block in each_top_level_statement'
     8: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:233:in `loop'
     7: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:251:in `block (2 levels) in each_top_level_statement'
     6: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:548:in `block in eval_input'
     5: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:758:in `signal_status'
     4: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:586:in `block (2 levels) in eval_input'
     3: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:650:in `handle_exception'
     2: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:601:in `encode_with_invalid_byte_sequence'
     1: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:601:in `new'
/Users/koic/src/github.com/ruby/irb/lib/irb.rb:601:in `initialize': code
converter not found (UTF-8 to UTF-8) (Encoding::ConverterNotFoundError)
```

First, this patch skips `Encoding::Converter.new` for the same encoding.
170531df19/lib/irb.rb (L601)

Next, this is a talk about the condition for skipping. `IRB.conf[:LC_MESSAGES].encoding`
becomes `"UTF-8"` string when `Reline.encoding_system_needs.name` is set in the below.
170531df19/lib/irb/input-method.rb (L269)

OTOH, `message.encoding` is `Encoding::UTF_8`, so these are compared as a string by this patch.

https://github.com/ruby/irb/commit/6df6e76cfc
2021-05-11 16:17:17 +09:00
Kazuki Yamaguchi 9edc162583 [ruby/resolv] Fix confusion of received response message
This is a follow up for commit 33fb966197f1 ("Remove sender/message_id
pair after response received in resolv", 2020-09-11).

As the @senders instance variable is also used for tracking transaction
ID allocation, simply removing an entry without releasing the ID would
eventually deplete the ID space and cause
Resolv::DNS.allocate_request_id to hang.

It seems the intention of the code was to check that the received DNS
message is actually the response for the question made within the method
earlier. Let's have it actually do so.

[Bug #12838] https://bugs.ruby-lang.org/issues/12838
[Bug #17748] https://bugs.ruby-lang.org/issues/17748

https://github.com/ruby/resolv/commit/53ca9c9209
2021-05-11 12:37:34 +09:00
David Rodríguez 5b0abba931 Sync bundler & rubygems 2021-05-11 11:29:41 +09:00
aycabta 774cc32b4d [ruby/irb] Treat encodings in exception correctly
https://github.com/ruby/irb/commit/4452adbe04
2021-05-11 09:32:08 +09:00
Hiroshi SHIBATA ce5779d8cc
[ruby/set] set is also dual licenses
https://github.com/ruby/set/commit/fc24457e53
2021-05-10 16:08:30 +09:00
Andrei Beliankou 94d858f81a
Add a space to separate sentences in the error message 2021-05-10 16:08:29 +09:00
Burdette Lamar 61e4499545
[ruby/set] Adding section: What's Here
https://github.com/ruby/set/commit/257dc452a7
2021-05-10 16:08:29 +09:00
Burdette Lamar 0a74547942
[ruby/set] Adding section: What's Here
https://github.com/ruby/set/commit/8f4c62768d
2021-05-10 16:08:29 +09:00
Burdette Lamar b8506eb476
[ruby/set] Adding section: What's Here
https://github.com/ruby/set/commit/254d927c8c
2021-05-10 16:08:29 +09:00
Burdette Lamar adc86f7a58
[ruby/set] Adding section: What's Here
https://github.com/ruby/set/commit/ab81354de1
2021-05-10 16:08:29 +09:00
Masataka Pocke Kuwabara de96ae9b71 [ruby/irb] Dump ancestors' methods by ls command
https://github.com/ruby/irb/commit/73edff287c
2021-05-08 14:00:40 +09:00
Jeremy Evans 120b835fae [ruby/timeout] Only run timeout_after hook on fiber scheduler if scheduler exists
https://github.com/ruby/timeout/commit/4893cde0ed
2021-05-06 16:51:10 +09:00
Jeremy Evans 44e8575ca6 [ruby/timeout] Avoid unnecessary object allocation
Idea from nobu.

https://github.com/ruby/timeout/commit/aecdaa23b3
2021-05-06 16:50:31 +09:00
Jeremy Evans 33b5e179a8 [ruby/timeout] Make Timeout::Error#exception with multiple arguments not ignore arguments
This makes:

  raise(Timeout::Error.new("hello"), "world")

raise a TimeoutError instance with "world" as the message instead
of "hello", for consistency with other Ruby exception classes.

This required some internal changes to keep the tests passing.

Fixes [Bug #17812]

https://github.com/ruby/timeout/commit/952154dbf9
2021-05-06 16:49:26 +09:00
Kazuki Yamaguchi 364044e090 [ruby/net-http] Do not require stringio
It is not used in net/http library code since commit 15ccd0118c13
(r36473 in ruby svn trunk, 2012).

require's in test suite are also cleaned up.

https://github.com/ruby/net-http/commit/996d18a43f
2021-05-06 15:58:41 +09:00
Hiroshi SHIBATA 965719f5eb
Fixed the file path for net-imap.gemspec 2021-05-06 15:24:49 +09:00
Hiroshi SHIBATA 5de6f1ab47
Move net-imap.gemspec to under the lib/net/imap directory. 2021-05-06 15:20:35 +09:00
nicholas a. evans 5a02281fab
[ruby/net-imap] Many documentation improvements
* updated obsoleted RFCs to current versions
* linked most references to their RFCs
* linked extension commands to their RFCs
* removed unidiomatic `()` from instance method links
* escaped `IMAP` in a few places
* converted all response structs to explicit classes: this makes much
  nicer rdoc output than listing them all under "constants"
* grouped flags constants into their own sections

https://github.com/ruby/net-imap/commit/9cd562ac84
2021-05-06 15:20:35 +09:00
nicholas a. evans b0de2e7fe9
[ruby/net-imap] Move send_*_data into net/imap/command_data
Partially implements #10.

https://github.com/ruby/net-imap/commit/64d1080d63
2021-05-06 15:20:35 +09:00
nicholas a. evans deae61e939
[ruby/net-imap] Move flags to net/imap/flags
Partially implements #10.

https://github.com/ruby/net-imap/commit/2a9afa83bf
2021-05-06 15:20:34 +09:00
nicholas a. evans 337c0e312b
[ruby/net-imap] Move UTF7 & datetime formatting to net/imap/data_encoding
Partially implements #10.

https://github.com/ruby/net-imap/commit/0d43c5e856
2021-05-06 15:20:34 +09:00
nicholas a. evans 4dc7b82427
[ruby/net-imap] move command data formatters to net/imap/command_data
Partially implements #10.

https://github.com/ruby/net-imap/commit/24e929fdd2
2021-05-06 15:20:34 +09:00
nicholas a. evans affb51045c
[ruby/net-imap] move response data structs to net/imap/response_data
Partially implements #10.

https://github.com/ruby/net-imap/commit/746757b936
2021-05-06 15:20:34 +09:00
nicholas a. evans 395a287736
[ruby/net-imap] move ResponseParser to lib/net/imap/response_parser
Partially implements #10.

https://github.com/ruby/net-imap/commit/c2408aac9a
2021-05-06 15:20:34 +09:00
nicholas a. evans 2fc91da86c
[ruby/net-imap] Clean up authenticators rdoc
Added RFC links to all SASL mechanism specifications.

https://github.com/ruby/net-imap/commit/53ff4b0c09
2021-05-06 15:20:34 +09:00
nicholas a. evans 912f39b2c3
[ruby/net-imap] Update AUTH=PLAIN to be a little closer to RFC4616
* Add authzid support
* must not contain NULL chars
* improve rdoc

https://github.com/ruby/net-imap/commit/a587fc71b7
2021-05-06 15:20:34 +09:00
nicholas a. evans 331005812f
[ruby/net-imap] Move each authenticator to its own file
Also updates rdoc with SASL specifications and deprecations.  Of these
four, only `PLAIN` isn't deprecated!

+@@authenticators+ was changed to a class instance var
+@authenticators+.  No one should have been using the class variable
directly, so that should be fine.

https://github.com/ruby/net-imap/commit/23f241b081
2021-05-06 15:20:33 +09:00
Takashi Kokubun a7f7479872
[ruby/erb] Document that `<% #` doesn't work
[Bug #17846]

b58b188028
2021-05-05 23:13:27 -07:00
ima1zumi b2c54f5395 [ruby/irb] Need reline >= 0.1.6
irb 1.3.5 need reline >= 0.1.6 because irb use `Reline::IOGate.in_pasting?`.
This method defined after reline 0.1.6.

fix #228.

https://github.com/ruby/irb/commit/6b7b8fc324
2021-04-30 20:46:50 +09:00
Marc-Andre Lafortune 7f1323c3bd
[ruby/ostruct] Add compatibility for to_h with block in Ruby 2.5
https://github.com/ruby/ostruct/commit/da45de5068
2021-04-28 17:48:05 +09:00
Marc-Andre Lafortune 37b445eaeb [ruby/ostruct] Compatibility with Ruby 2.5
https://github.com/ruby/ostruct/commit/ecd9fafdf8
2021-04-28 17:33:59 +09:00
Ryuta Kamizono 908785ef6d [ruby/net-imap] Fix typo intentionaly -> intentionally [ci skip]
https://github.com/ruby/net-imap/commit/4057c662e7
2021-04-28 11:10:52 +09:00
Jeremy Evans 0296a64450 [ruby/net-http] Initialize OpenSSL early before creating TCPSocket
OpenSSL make take some time to initialize, and it would be best
to take that time before connecting instead of after.

From joshc on Redmine.

Fixes Ruby Bug #9459

https://github.com/ruby/net-http/commit/14e09fba24
2021-04-28 11:03:12 +09:00
Jean Boussier 1229ad0528 [ruby/net-http] Fix the regexp used to clean the host
Introduced in https://github.com/ruby/ruby/commit/c1652035644

`/s` marks the regexp as encoded with Windows-31J which makes little
sense.

Nurse thinks the intent was to use `/m` for a multi-line regexp.

https://github.com/ruby/net-http/commit/6c15342cdf
2021-04-28 11:01:41 +09:00
Lukas Eipert 842f00f452 [ruby/net-http] Decode user and password from env configured proxy
If someone sets an env variable defining a http_proxy, containing a
username / password with percent-encoded characters, then the resulting
base64 encoded auth header will be wrong.

For example, suppose a username is `Y\X` and the password is `R%S] ?X`.
Properly URL encoded the proxy url would be:

    http://Y%5CX:R%25S%5D%20%3FX@proxy.example:8000

The resulting proxy auth header should be: `WVxYOlIlU10gP1g=`, but the
getters defined by ruby StdLib `URI` return a username `Y%5CX` and
password `R%25S%5D%20%3FX`, resulting in `WSU1Q1g6UiUyNVMlNUQlMjAlM0ZY`.
As a result the proxy will deny the request.

Please note that this is my first contribution to the ruby ecosystem, to
standard lib especially and I am not a ruby developer.

References:

- https://gitlab.com/gitlab-org/gitlab/-/issues/289836
- https://bugs.ruby-lang.org/projects/ruby-master/repository/trunk/revisions/58461
- https://bugs.ruby-lang.org/issues/17542

https://github.com/ruby/net-http/commit/e57d4f38aa
2021-04-28 11:01:23 +09:00
mohamed 8a2b7b79ee [ruby/net-http] Replace Timeout.timeout in Net:HTTP#connect
Use Socket.tcp's connect_timeout option instead

https://github.com/ruby/net-http/commit/753cae3bbc
2021-04-28 10:58:13 +09:00
Tom Freudenberg e22626f08e [ruby/net-smtp] mod: bump to a new VERSION that could be checked for testings >0.2.1
https://github.com/ruby/net-smtp/commit/8f2c9323e2
2021-04-28 10:51:10 +09:00
Hiroshi SHIBATA eebecdf1c4 [ruby/net-smtp] Removed needless files from Gem::Specification#files
https://github.com/ruby/net-smtp/commit/69bba6b125
2021-04-28 10:48:13 +09:00
mohamed ff931d0336 [ruby/net-smtp] Replace Timeout.timeout with socket timeout
Timeout.timeout is inefficient since it spins up a new thread for
each invocation, use Socket.tcp's connect_timeout option instead

https://github.com/ruby/net-smtp/commit/6ae4a59f05
2021-04-28 10:47:29 +09:00
Tom Freudenberg 4c8cce5b8a [ruby/net-smtp] Net::SMTP.start() and #start() accepts ssl_context_params keyword argument
Additional params are passed to OpenSSL::SSL::SSLContext#set_params.

	For example, `Net::SMTP#start(ssl_context_params: { cert_store: my_store, timeout: 123 })`
	calls `set_params({ cert_store: my_store, timeout: 123 })`.

https://github.com/ruby/net-smtp/commit/4213389c21
2021-04-28 10:46:38 +09:00
Gannon McGibbon 1b2abb6590 [ruby/net-ftp] Replace "iff" with "if and only if"
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.

https://github.com/ruby/net-ftp/commit/e920473618
2021-04-27 21:22:56 +09:00
Shugo Maeda 4ae27d8075
[ruby/net-ftp] Reduce resource cosumption of Net::FTP::TIME_PARSER
Reported by Alexandr Savca as a DoS vulnerability, but Net::FTP is a
client library and the impact of the issue is low, so I have decided
to fix it as a normal issue.
Based on patch by nobu.

https://github.com/ruby/net-ftp/commit/a93af636f8
2021-04-27 21:21:33 +09:00
Jeremy Evans 990baec411 [ruby/net-ftp] Close the passive connection data socket if there is an error setting up the transfer
Previously, the connection leaked in this case.  This uses
begin/ensure and checking for an error in the ensure block.

An alternative approach would be to not even perform the
connection until after the RETR (or other) command has been
sent.  However, I'm not sure all FTP servers support that.
The current behavior is:

* Send (PASV/EPSV)
* Connect to the host/port returned in 227/229 reply
* Send (RETR/other command)

Changing it to connect after the RETR could break things.
FTP servers might expect that the client has already
connected before sending the RETR.  The alternative
approach is more likely to introduce backwards compatibility
issues, compared to the begin/ensure approach taken here.

Fixes Ruby Bug 17027

https://github.com/ruby/net-ftp/commit/6e8535f076
2021-04-27 21:21:00 +09:00
mohamed a86c6cb34d [ruby/net-ftp] Replace Timeout.timeout with socket timeout
Timeout.timeout is inefficient since it spins up a new thread for
each invocation, use Socket.tcp's connect_timeout option instead
when we aren't using SOCKS (we can't replace Timeout.timeout
for SOCKS yet since SOCKSSocket doesn't have a connect_timeout
option).

https://github.com/ruby/net-ftp/commit/d65910132f
2021-04-27 21:20:48 +09:00
Marc-Andre Lafortune 3af2e8927a [ruby/matrix] v0.4.1
https://github.com/ruby/matrix/commit/f7c9981907
2021-04-27 21:01:42 +09:00
Marc-Andre Lafortune c57ba9b957 [ruby/matrix] v0.4.0
https://github.com/ruby/matrix/commit/baea4b90d4
2021-04-27 21:01:08 +09:00
Hiroshi SHIBATA acf599e67c [ruby/matrix] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/matrix/commit/1381fde5c1
2021-04-27 20:57:54 +09:00
Yusuke Endoh 203eeeefdd Revert "disable shareable_constant_value for CI"
This reverts commit c647205c3e.

Maybe the root issue was fixed by 7ac078e5b67ba752a755d6bd9c3a99999767fd3a
2021-04-26 22:46:51 +09:00
Nobuyoshi Nakada 8fdc45c894 [ruby/irb] Added `colorable` keyword option
Currently `IRB::Color.colorize` and `IRB::Color.colorize_code`
refer `$stdin.tty?` internally.
This patch adds `colorable` keyword option which overrides it.

https://github.com/ruby/irb/commit/402e3f1907
2021-04-26 21:14:52 +09:00
Ryuta Kamizono fc24b0736e [ruby/irb] Fix typo ture -> true [ci skip]
https://github.com/ruby/irb/commit/783a0569e8
2021-04-26 21:13:42 +09:00
Koichi Sasada c647205c3e disable shareable_constant_value for CI
To debug CI failures on FreeBSD, disable `shareable_constant_value`.
2021-04-26 11:33:07 +09:00
Steven Harman bbee6968f8 [ruby/uri] Use Regexp#match? to avoid extra allocations
`#=~` builds `MatchData`, requiring extra allocations as compared to
`#match?`, which returns a boolean w/o having to build the `MatchData`.

https://github.com/ruby/uri/commit/158f58a9cc
2021-04-22 14:55:44 +09:00
Felix Wong 291cfa7125 [ruby/uri] remove comment about URI::escape as it is removed
https://github.com/ruby/uri/commit/0f0057e1b2
2021-04-22 14:55:05 +09:00
Jeremy Evans d4a490f26a [ruby/uri] Set required_ruby_version to 2.4 in gemspec
Tests pass on Ruby 2.4, but not on Ruby 2.3.

https://github.com/ruby/uri/commit/594418079a
2021-04-22 14:54:56 +09:00
Jeremy Evans 10ad81eb2d [ruby/uri] Only use UnboundMethod#bind_call if it is available
This allows tests to pass on Ruby 2.4-2.6.

Fixes #19

https://github.com/ruby/uri/commit/67ca99ca87
2021-04-22 14:54:47 +09:00
Lukas Zapletal c46a4b8c7f [ruby/uri] Optimize URI#hostname and URI#hostname=
https://github.com/ruby/uri/commit/3b7ccfd835
2021-04-22 14:54:28 +09:00
Charles Oliver Nutter 6e06c980da [ruby/uri] Upstream Java proxy property checks from JRuby
These Java properties, retrieved from JRuby's "Java env" ENV_JAVA,
allow JRuby users to use the same proxy properties the rest of the
Java platform uses.

This resolves https://bugs.ruby-lang.org/issues/11194

https://github.com/ruby/uri/commit/3bd2bcc95a
2021-04-22 14:54:19 +09:00
Shugo Maeda a9fe00c3ba [ruby/net-imap] Bump version to 0.2.1
https://github.com/ruby/net-imap/commit/31f96ea884
2021-04-22 14:38:32 +09:00
Shugo Maeda d785c5b8b2 [ruby/net-imap] Set timeout for IDLE responses
Fixes #14

https://github.com/ruby/net-imap/commit/39d39ff9bb
2021-04-22 14:38:23 +09:00
Hiroshi SHIBATA 674760316c
Merge net-imap-0.2.0 2021-04-22 14:37:45 +09:00
Olle Jonsson b18aab24b6
[ruby/benchmark] gemspec: Explicitly have 0 executables
This gem exposes no executables.

https://github.com/ruby/benchmark/commit/ff1ef7ae06
2021-04-22 11:51:37 +09:00
Keith Bennett 4f39a35b60
[ruby/benchmark] Add comment about terminating newline in captions; fix test method name.
https://github.com/ruby/benchmark/commit/02ce298d3e
2021-04-22 11:51:37 +09:00
Olle Jonsson 2440d60acb
[ruby/cgi] gemspec: Explicitly empty executables list
The gem exposes no executables

https://github.com/ruby/cgi/commit/cd7106ad97
2021-04-22 11:51:37 +09:00
pavel 2756938369
[ruby/cgi] handle invalid encoding
https://github.com/ruby/cgi/commit/2b1c2e21a4
2021-04-22 11:51:36 +09:00
Kir Shatrov 53d153e42c
[ruby/time] Make Time friendly to Ractor
https://github.com/ruby/time/commit/c784e4f166
2021-04-22 11:51:36 +09:00
Hiroshi SHIBATA 3c8a67e8a5 [ruby/pp] Bump version to 0.2.0
https://github.com/ruby/pp/commit/a202dd2c9b
2021-04-21 20:45:23 +09:00
Hiroshi SHIBATA 17441a6b1b [ruby/pp] Support < Ruby 3.0
https://github.com/ruby/pp/commit/3ee131ae92
2021-04-21 20:44:55 +09:00
Olle Jonsson 2229fc8b57 [ruby/resolv] gemspec: Explicitly list 0 executables
This gem exposes no executables, and this makes that clearer.

https://github.com/ruby/resolv/commit/8797a9d3ce
2021-04-21 20:43:18 +09:00
Olle Jonsson c27e8f1caf [ruby/forwardable] gemspec: Explicitly empty the executables list
This gem exposes no executables.

https://github.com/ruby/forwardable/commit/374b685927
2021-04-21 20:41:52 +09:00
Olle Jonsson b68a4c199c [ruby/base64] gemspec: Use an explicit file list
This avoids shelling out to git.

https://github.com/ruby/base64/commit/f45f06f93f
2021-04-21 20:41:26 +09:00
Olle Jonsson fa00bf92ba [ruby/base64] gemspec: Explicitly empty executables list
This gem exposes no executables.

https://github.com/ruby/base64/commit/9d2c49cb19
2021-04-21 20:41:17 +09:00