Commit graph

7218 commits

Author SHA1 Message Date
Nobuyoshi Nakada
fd9f26df00
Drop fossil rubygems support 2019-07-13 07:25:54 +09:00
Nobuyoshi Nakada
143581cf4e
Removed stub lines from gemspec files 2019-07-13 07:25:51 +09:00
Masatoshi SEKI
cbe623f1c7 change default value of load_limit (ignore load_limit) 2019-07-13 07:22:55 +09:00
aycabta
71ead07872 Add arg check to Reline.dig_perfect_match_proc= 2019-07-11 17:21:00 +09:00
Tanaka Akira
50d85436f8 WEBrick::HTTPResponse create tempfile if required.
WEBrick::HTTPProxyServer implementes HTTP proxy using
WEBrick and Net::HTTP.
WEBrick accepts HTTP/1.0 clients and
Net::HTTP uses always HTTP/1.1.

However HTTP/1.1 supports chunked transfer coding HTTP/1.0 doesn't.

Chunked transfer coding doesn't require that
content-length before the content is sent.
But non-chunked transfer coding require content-length before
the content is sent.

So, when HTTP/1.0 clients connects WEBrick::HTTPProxyServer and
origin server returns chunked response,
WEBrick::HTTPProxyServer needs to store whole content to
know the length of it.

This patch do it using tempfile.
2019-07-11 09:18:41 +09:00
NARUSE, Yui
f91879a7b5 handle_interrupt to defend monitor state [Bug #15992]
If an exception is raised from another thread for example Timeout
and this thread is just after `mon_exit`'s `@mon_owner = nil`,
the exception breaks the state of MonitorMixin. To prevent that situation,
it need to block interruption in mon_enter and mon_exit.
2019-07-10 18:13:38 +09:00
Nobuyoshi Nakada
e9907122ed
Suppress a warning when write_headers: true 2019-07-08 13:03:50 +09:00
Jeremy Evans
3fcffceafd Fix default argument values for OptParse::Switch#summarize
The documentation describes these arguments being hashes, and the method
is called with hashes, so a hash default makes more sense.

The method would fail previously if called without arguments and @short
or @long contained a non-integer value.

Fixes [Bug #10928]
2019-07-07 13:49:47 -07:00
Nobuyoshi Nakada
688cef2169
Refactored width calculations 2019-07-06 12:31:11 +09:00
Nobuyoshi Nakada
44aae5fee6
Simplified 2019-07-06 12:11:12 +09:00
aycabta
89e178c7cb Fix showing document of ClassName.method_name in IRB
In IRB, Time.new is split as "Time", ".", and "new". The receiver "Time"
is processed by #class method but it means that "Time" changes to
"Class". This commit fixes it.
2019-07-06 07:19:37 +09:00
aycabta
6c2b59f923 Support Control- and Meta- 2019-07-04 20:58:11 +09:00
aycabta
d9f8b88b47 Move a comment to proper place 2019-07-04 19:34:08 +09:00
Nobuyoshi Nakada
265b9a0edf
Parse key sequence more strictly 2019-07-04 18:54:50 +09:00
Nobuyoshi Nakada
12e06d32f5
Use lstrip instead of gsub which can match only once 2019-07-04 18:49:42 +09:00
Nobuyoshi Nakada
ee861e43f7
Skip indented comment lines [Bug #15981] 2019-07-04 18:47:22 +09:00
aycabta
7b9bb6f44a Check code_block_open for whether code continues 2019-07-03 23:37:46 +09:00
Kazuhiro NISHIYAMA
e44c9b1147
Try to avoid not delagated error
```
.../ruby/lib/delegate.rb:405:in `__getobj__': not delegated (ArgumentError)
```
20190703T063006Z.fail.html.gz
2019-07-03 19:29:12 +09:00
aycabta
776759e300 Keyword token that follows EXPR_FNAME must be a method name 2019-07-02 03:34:15 +09:00
aycabta
76851381cb Show "-" if indent level is negative 2019-07-01 21:14:50 +09:00
Nobuyoshi Nakada
90c51ca391 New indent must be non-negative number 2019-07-01 20:46:00 +09:00
aycabta
c718f56ed9 Remove auto indent of continuation line 2019-06-28 22:25:35 +09:00
Nobuyoshi Nakada
023360ee4b
[DOC] Singleton.instance [ci skip] 2019-06-28 14:38:43 +09:00
Nobuyoshi Nakada
2d1728b9ce
Moved Singleton.instance to get rid of redefinition 2019-06-28 14:23:32 +09:00
Nobuyoshi Nakada
951f80f2dd
Removed unused variable 2019-06-28 14:09:26 +09:00
Jeremy Evans
14b0c94ac3 Fix documentation for Net::SMTPServerBusy
Fixes [Bug #11628]
2019-06-27 16:57:19 -07:00
aycabta
2fd03fd7e6 EXPR_LABEL also indicates non-continuation line
Example:

  [
    1, # this is not continuation line
    2
  ]
2019-06-27 16:03:43 +09:00
Kazuhiro NISHIYAMA
c86a9e6592
bc mode is already removed [ci skip] 2019-06-27 11:18:02 +09:00
aycabta
d6bcf36793 EXPR_CMDARG also indicates the end of an expression 2019-06-27 10:59:26 +09:00
aycabta
24c4e6dec1 Increase indent of continuation line
v =
    3 # auto indent
2019-06-27 01:26:14 +09:00
aycabta
72bfc52de6 Decrease indent by closing token correctly 2019-06-27 01:21:06 +09:00
aycabta
ba17127e99 Decrease nesting level when closing token comes at a non-first token of line 2019-06-26 18:44:27 +09:00
Nobuyoshi Nakada
fe0ddf0e58
ensure is not a continuos line 2019-06-26 15:01:01 +09:00
Nobuyoshi Nakada
a3d1cacda6
Decrease indent at "elsif" too 2019-06-26 10:49:23 +09:00
Nobuyoshi Nakada
ea8bc6822d
Remove other debug prints 2019-06-26 10:49:23 +09:00
aycabta
cfa1a18431 Remove debug print...sorry 2019-06-26 08:07:58 +09:00
aycabta
57e1a69ea3 Treat auto indent with newline correctly 2019-06-25 22:07:32 +09:00
aycabta
0b57f9b25d Decrease indent when "else", "rescue", "ensure", "when", or "in" come 2019-06-25 22:02:31 +09:00
Jeremy Evans
d118c84b0b Fix IO#scanf on pipes on Windows
IO.seek on a pipe on Windows raises Errno::EINVAL instead of
Errno::ESPIPE.

Fixes Ruby Bug #15199
2019-06-25 15:56:20 +09:00
David Rodríguez
e572ff2f95 Require version file relatively 2019-06-25 15:56:20 +09:00
SHIBATA Hiroshi
083fda8490 Bump version to 1.2.0. 2019-06-25 15:56:20 +09:00
aycabta
9c19cd5222 Refactor calculation of corresponding token depth 2019-06-25 00:18:55 +09:00
Rob
c6229e7c69 Adds WebAssembly MIME type 2019-06-24 10:11:56 +09:00
Nobuyoshi Nakada
11a60f9bdb Remove extraneous spaces at the end of status line
Remove extraneous spaces after the status code that is
non-compliant with RFC, i.e `HTTP 200 OK `, to unnecessary
confusion for WEBrick users, by a risk that WEBrick instances in
the wild will have server responses flagged as suspicious or
malicious due to a similar bug in [Cobalt Strike
misconfiguration].

Reported by Matt Tennis <mtennis@paloaltonetworks.com>

[Cobalt Strike misconfiguration]: https://blog.fox-it.com/2019/02/26/identifying-cobalt-strike-team-servers-in-the-wild/
2019-06-24 10:11:47 +09:00
aycabta
c79131df28 Treat closing token with starting token at head of 2nd line correctly
v =
  if true # starting token at head of 2nd line
    3
  end # closing token
2019-06-22 00:31:42 +09:00
aycabta
5e2088665b Do auto indent only when closing token at first of line
if true
    3; end # this isn't auto-indented
2019-06-22 00:31:42 +09:00
Nobuyoshi Nakada
1c7e303b26
Constified unusable chars 2019-06-21 23:04:34 +09:00
aycabta
50841eca43 Support irregular auto indent
v =
    if true
      3
    end # this "end" is auto-indented correctly
2019-06-21 21:35:25 +09:00
Espartaco Palma
4149fd6078
Fix small typo on block_scanf example [ci-skip]
Closes: https://github.com/ruby/ruby/pull/2247
2019-06-21 15:29:29 +09:00
Jeremy Evans
4a5e07d8e1 Avoid verbose warning when using Net::POP3 with SSL
Patch from Jos Kamphorst.

Fixes [Bug #14822]
2019-06-20 10:22:01 -07:00