Age | Commit message (Collapse) | Author |
|
* parse.y (tok_hex): flush token after dispatching the "invalid
hex escape" parse error.
|
|
Fixes [Bug #15889]
|
|
```
% 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
```
|
|
|
|
|
|
|
|
|
|
Closes: https://github.com/ruby/ruby/pull/2221
|
|
Closes: https://github.com/ruby/ruby/pull/2222
|
|
|
|
|
|
|
|
|
|
Skip the webrick httpauth tests that use crypt when testing on
OpenBSD.
Fixes [Bug #11363]
|
|
|
|
|
|
|
|
|
|
I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
|
|
|
|
|
|
* variable.c (set_namespace_path): modules/classes can get named
by assignment to constant, even if frozen. [Bug #15891]
|
|
`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]
|
|
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]
|
|
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]
|
|
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
5b64d7ac6e7cbf759b859428f125539e58bac0bd. 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.
|
|
* parse.y (here_document): adjust token to the here-doc identifier
in compile_error when a here-document misses the closing
identifier.
|
|
|
|
* parse.y: continue parsing the rest of the here-document starting
line, after the terminator was not found.
|
|
* lib/irb/color.rb (IRB::Color.colorize_code): colorize
`compile_error` part as same as `on_parse_error`.
|
|
* parse.y (parse_atmark): return EXPR_END or EXPR_ENDFN, depending
on the previous state, even incomplete names consistently.
|
|
|
|
|
|
for Solaris.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190528T191908Z.fail.html.gz
|
|
|
|
and dependent commits c67934b1c3b40dda5f170b032423e520511c68dd and
f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f.
RubyCI and ci.rvm.jp are almost dead by timeout since this commit.
---
Revert "Skip a reline test hanging on Wercker since 3b7862c8e8"
This reverts commit f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f.
Revert "Remove extra items because Reline::HISTORY is a sized queue"
This reverts commit c67934b1c3b40dda5f170b032423e520511c68dd.
Revert "Use existing instances for LineEditor and Config"
This reverts commit 3b7862c8e88cd7838a53ec083ac5733386400956.
|
|
like https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cedad11105780001c4e7001?step=5cedaf6b48fad200076fe77b
|
|
|
|
|
|
* parse.y (warn_space_char_code): warn whitespace characters
escaped with meta/control prefix.
|
|
The old certificate files (for example, test/rubygems/ca_cert.pem) were
signed by SHA1. This message digest is considered too weak and rejected
by OpenSSL 1.1.1 or later. Because of this, the test suite does not
pass on Debian 10.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T123003Z.fail.html.gz#test%2Frubygems
This change regenerates the files.
A shell script for the regeneration (util/create_certs.sh) is also
added.
|
|
* parse.y (parse_atmark): numbered parameter name is not allowed
as a symbol regardless the context.
|
|
|
|
|
|
|
|
* parse.y (ripper_token): added Ripper#token which returns the
current token string. [EXPERIMENTAL]
|
|
OpenSSL 1.1.1 requires 2048 bits or more. This change will fix:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T003004Z.fail.html.gz#test%2Fopen-uri
|
|
* lib/irb/context.rb (IRB::Context#evaluate): separate the code
from wrapping lines to propagate the given exception, not to show
the wrapping lines when SyntaxError.
|
|
|
|
Similar to NameError#receiver, this returns the object on which
the modification was attempted. This is useful as it can pinpoint
exactly what is frozen. In many cases when a FrozenError is
raised, you cannot determine from the context which object is
frozen that you attempted to modify.
Users of the current rb_error_frozen C function will have to switch
to using rb_error_frozen_object or the new rb_frozen_error_raise
in order to set the receiver of the FrozenError.
To allow the receiver to be set from Ruby, support an optional
second argument to FrozenError#initialize.
Implements [Feature #15751]
|