Commit graph

12086 commits

Author SHA1 Message Date
Yusuke Endoh
75751dca2b test/openssl/utils.rb: Extend the timeout for armv7l
20190607T051708Z.fail.html.gz
2019-06-07 23:37:55 +09:00
Nobuyoshi Nakada
6566919176
ripper_state_lex.rb: chomp CR
* lib/rdoc/parser/ripper_state_lex.rb (RDoc::Parser::RipperStateLex):
  chomp newline, including CR, from here document terminator.

Closes: ruby/rdoc#694
Closes: ruby/rdoc#697
Closes: ruby/rdoc#705
2019-06-07 18:57:58 +09:00
Yusuke Endoh
a6a26e42b1 compile.c: Partially revert r63870 which caused wrong optimization
[Bug #15906]
2019-06-07 14:46:59 +09:00
Jeremy Evans
b8af33e63b Skip one assertion for OpenSSL::PKey::EC::Point#mul on LibreSSL
LibreSSL 2.8.0+ does not support multiple elements in the first
argument.
2019-06-06 21:46:36 -07:00
Yusuke Endoh
7e403dc6c8 test/openssl/utils.rb: Extend the timeout
20190606T171708Z.fail.html.gz
2019-06-07 09:26:40 +09:00
Yusuke Endoh
9f941f61ef test/webrick/test_filehandler.rb: extend the timeout for Solaris CI
20190602T031908Z.fail.html.gz
2019-06-06 21:50:30 +09:00
Yusuke Endoh
60924636e5 test/net/http/test_http.rb: extend the timeout for Solaris CI
20190605T231909Z.fail.html.gz
2019-06-06 21:50:21 +09:00
Yusuke Endoh
1e54903684 test/openssl: Support OpenSSL 1.1.1
OpenSSL 1.1.1 rejects some shorter keys, which caused some failures of
`make test-all TESTS=openssl`.

20190606T003005Z.fail.html.gz

This change merges 6bbc31ddd1 and 63fb3a36d1 in
https://github.com/ruby/openssl.
Reference: https://github.com/ruby/openssl/pull/217
2019-06-06 14:20:58 +09:00
aycabta
02880d1f4a Skip transpose-words if less than 2 word 2019-06-06 04:57:52 +09:00
aycabta
eadc06ba16 Add test_ed_transpose_words_for_mbchar 2019-06-06 04:25:16 +09:00
Nobuyoshi Nakada
1624d77f3e
error.c: avoid infinite recursion at inspecting the frozen object 2019-06-05 13:31:09 +09:00
Nobuyoshi Nakada
b2fe7484e7
Test for f1f04caf60 2019-06-05 12:57:14 +09:00
Jeremy Evans
f1f04caf60 Include inspect value of object in FrozenError messages
FrozenError#receiver was added recently for getting the related
object programmatically.  However, there are cases where FrozenError
is raised and not handled, and in those cases the resulting error
messages lack detail, which makes debugging the error more difficult,
especially in cases where the error is not easily reproducible.
This includes the inspect value of the frozen object in FrozenError
messages, which should make debugging simpler.
2019-06-04 19:25:03 -07:00
Nobuyoshi Nakada
9e472e18d2
suppress marshal warnings 2019-06-04 19:00:48 +09:00
Nobuyoshi Nakada
51d27d25d7
test/lib/test/unit.rb: use colorize.rb 2019-06-04 18:51:49 +09:00
Nobuyoshi Nakada
e7aa87c353
Renamed duplicate test 2019-06-04 18:33:34 +09:00
aycabta
9a07915ae2 Add aliases for commands for changing text macro 2019-06-04 08:35:01 +09:00
aycabta
4b7213a85a Implement transpose-words 2019-06-04 07:23:36 +09:00
Takashi Kokubun
0da9205f15
Remove conflict resolution mistake [ci skip]
in de541fe196 🙇
2019-06-04 00:32:17 +09:00
Takashi Kokubun
d21a694075
Improve test_color to prevent regression
Actually de541fe196 was still needed.
This commit would improve the test coverage using the branch.
2019-06-04 00:29:54 +09:00
Takashi Kokubun
de541fe196
colorize_code must return escaped text
This was needed before 0c459af7c2 but it
could be actually useless now. But I added this anyway just in case.
2019-06-04 00:26:02 +09:00
Nobuyoshi Nakada
0c459af7c2
Colorize error characters
* lib/irb/color.rb (IRB::Color.scan): ignore "incomplete end of
  input" error only, to colorize invalid characters, e.g., control
  characters, and invalid symbols, as errors.
2019-06-04 00:14:55 +09:00
Nobuyoshi Nakada
c990b3c41a
Fix the error token on "invalid hex escape"
* parse.y (tok_hex): flush token after dispatching the "invalid
  hex escape" parse error.
2019-06-03 15:15:54 +09:00
Jeremy Evans
17af8bfce6 Make size on an infinite each_slice enumerator return Infinity
Fixes [Bug #15889]
2019-06-02 20:00:35 -07:00
Kazuhiro NISHIYAMA
533070bfc6
Use lines instead of split
```
% cat ~/bench-split.yml
prelude: |
  s = "foo\nbar\nbaz\n"
benchmark:
  '/(?<=\n)/': |
    s.split(/(?<=\n)/)
  '/^/': |
    s.split(/^/)
  'lines': |
    s.lines
Warming up --------------------------------------
           /(?<=\n)/   459.123k i/s -    467.844k times in 1.018994s (2.18μs/i)
                 /^/   467.922k i/s -    469.744k times in 1.003894s (2.14μs/i)
               lines     2.343M i/s -      2.424M times in 1.034677s (426.84ns/i)
Calculating -------------------------------------
           /(?<=\n)/   422.347k i/s -      1.377M times in 3.261232s (2.37μs/i)
                 /^/   477.603k i/s -      1.404M times in 2.939186s (2.09μs/i)
               lines     2.485M i/s -      7.028M times in 2.828757s (402.47ns/i)

Comparison:
               lines:   2484631.6 i/s
                 /^/:    477603.3 i/s - 5.20x  slower
           /(?<=\n)/:    422346.5 i/s - 5.88x  slower
```
2019-06-03 10:32:32 +09:00
aycabta
182072b211 The C-q is also quoted insert in emacs mode 2019-06-03 04:17:52 +09:00
aycabta
5524de5ca0 Add aliases for commands for moving macro 2019-06-03 03:41:40 +09:00
aycabta
1bfba99b79 Close leaked file descripters in tests 2019-06-03 03:38:39 +09:00
aycabta
3428922437 The ed_move_to_beg is different from vi_first_print 2019-06-03 03:29:34 +09:00
Nobuyoshi Nakada
3457ce4486 Fix ArgumentError in aliased macro
Closes: https://github.com/ruby/ruby/pull/2221
2019-06-03 01:35:48 +09:00
Nobuyoshi Nakada
f4b060d8d7 Check conditional nestings in INPUTRC
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Kazuhiro NISHIYAMA
4fda39fc87
Use simpler regexp 2019-06-02 22:37:42 +09:00
Nobuyoshi Nakada
d04ebc57f2 Add true condition Reline 2019-06-02 20:31:25 +09:00
aycabta
486a2c26d6 Add Reline test for unknown macro 2019-06-02 08:50:01 +09:00
aycabta
e360688c4d Add new test for Reline within pipe 2019-06-02 07:39:12 +09:00
Jeremy Evans
4b9869e7e0 Update String#crypt tests to work on OpenBSD
Skip the webrick httpauth tests that use crypt when testing on
OpenBSD.

Fixes [Bug #11363]
2019-06-01 10:50:06 -07:00
Hiroshi SHIBATA
2bad001cfd
Ignore warnings about mismatched indentations. 2019-06-01 15:23:24 +03:00
Hiroshi SHIBATA
464e55f1d0
Ignore warnings about argument prefix with operator symbol. 2019-06-01 15:20:21 +03:00
Hiroshi SHIBATA
3c77ef9adc
Ignore warnings about ambiguous first argument with the negative integer. 2019-06-01 15:07:35 +03:00
Hiroshi SHIBATA
9eecd7a2fd
Ignore warnings about ambiguous first argument of regexp with assert match. 2019-06-01 14:44:24 +03:00
Hiroshi SHIBATA
56660de3c6 Merge rubygems master from upstream.
I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
2019-06-01 13:50:41 +03:00
aycabta
de01c4ec00 Reset Config at Reline::Config::Test#teardown 2019-06-01 16:47:59 +09:00
aycabta
7df65ef676 Use inputrc data for keystroke setting 2019-06-01 09:06:27 +09:00
Nobuyoshi Nakada
c1e5299787
Fix FrozenError when assigning frozen class to constant
* variable.c (set_namespace_path): modules/classes can get named
  by assignment to constant, even if frozen.  [Bug #15891]
2019-06-01 02:41:14 +09:00
Alan Wu
ea42423908
Keep vm->orig_progname alive
`vm->orig_progname` can be different from `vm->progname` when user
code assigns to `$0`. While `vm->progname` is kept alive by the
global table, nothing marked `vm->orig_progname`.

[Bug #15887]
2019-05-31 14:38:35 +09:00
Jeremy Evans
e8c710b11a Fix visibility of some methods when using DelegateClass
Public instance methods added to a delegated class after the
creation of the delegate class were not returned by the
public_instance_methods class method of the delegate class.

Protected instance methods in the delegated class when the
delegate class is created were returned by the public_methods
instance method of the delegate class.

Patch mostly from Kenichi Kamiya <kachick1@gmail.com> in
GitHub pull request 926.  Minor changes to get it to apply,
and to fix tests after applying by me.

Fixes [Bug #11512]
2019-05-30 18:34:45 -07:00
Jeremy Evans
1cd93f1cdf Allow DelegateClass() to module_eval given block
Methods that return classes often module_eval the given block
(e.g. Class.new and Struct.new).  This allows DelegateClass to
work similarly.  This makes it easier to use DelegateClass
directly without subclassing, so as not to create an unnecessary
subclass.

Implements [Feature #15842]
2019-05-30 18:34:45 -07:00
Takashi Kokubun
cb40a21da0
Warn compile_error only when input is finished
Let's say we are in progress to write `"foo"`:

```
irb> "fo
```

at this moment, nothing is wrong.
It would be just a normal way to write `"foo"`.

Prior to this commit, the `fo` part was warned because of
5b64d7ac6e. But I think warning such a
normal input is not valuable for users.

However, we'd like to warn `:@1` or `@@1` which is also a syntax error.
Then this commit switches the syntax highlight based on whether the
input text is finished or not. When it's not finished yet, it does not
warn compile_error.
2019-05-31 06:54:00 +09:00
Nobuyoshi Nakada
92ecf58b1e
parse.y: adjust here-doc error token
* parse.y (here_document): adjust token to the here-doc identifier
  in compile_error when a here-document misses the closing
  identifier.
2019-05-30 22:03:33 +09:00
Nobuyoshi Nakada
b0e2b7a5ff
Include stack elements left after errors 2019-05-30 21:54:38 +09:00