Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/reline/commit/066ecb0a21
|
|
Sort the results which matched single wildcard or character set in
binary ascending order, unless `sort: false` is given. The order
of an Array of pattern strings and braces are not affected.
Notes:
Merged: https://github.com/ruby/ruby/pull/2846
|
|
In #2818, `Hash.ruby2_keywords!` has renamed to `Hash.ruby2_keywords_hash`.
Notes:
Merged: https://github.com/ruby/ruby/pull/2849
|
|
|
|
This breaks tests using this path on JRuby because the `jruby`
executable turns into `jjruby` after the sub.
https://github.com/ruby/io-console/commit/e5951aa34c
|
|
It was found that a feature to check and add ruby2_keywords flag to an
existing Hash is needed when arguments are serialized and deserialized.
It is possible to do the same without explicit APIs, but it would be
good to provide them as a core feature.
https://github.com/rails/rails/pull/38105#discussion_r361863767
Hash.ruby2_keywords_hash?(hash) checks if hash is flagged or not.
Hash.ruby2_keywords_hash(hash) returns a duplicated hash that has a
ruby2_keywords flag,
[Bug #16486]
Notes:
Merged: https://github.com/ruby/ruby/pull/2818
|
|
It is useful for a program that dumps and load arguments (like drb).
In future, they should deal with both positional arguments and keyword
ones explicitly, but until ruby2_keywords is deprecated, it is good to
support the flag in marshal.
The implementation is similar to String's encoding; it is dumped as a
hidden instance variable.
[Feature #16501]
Notes:
Merged: https://github.com/ruby/ruby/pull/2830
|
|
|
|
|
|
|
|
|
|
|
|
[Feature #16432]
|
|
|
|
Split with the matched part when the separator matches the empty
part at the beginning. [Bug #11014]
|
|
`String#sub` with a string pattern defers creating a `Regexp`
until `MatchData#regexp` creates a `Regexp` from the matched
string. `Regexp#last_match(group_name)` accessed its content
without creating the `Regexp` though. [Bug #16508]
|
|
[Feature #8948] [Feature #16377]
Since Regexp literals always reference the same instance,
allowing to mutate them can lead to state leak.
Notes:
Merged: https://github.com/ruby/ruby/pull/2705
|
|
The command prompt on Windows always uses Unicode to take input and print
output but most Reline implementation depends on Encoding.default_external.
This commit introduces an abstracted structure about the encoding of Reline.
|
|
https://github.com/ruby/irb/issues/55
If we had put multiple open braces on a line the with no closing brace
spaces_of_nest array keeps getting '0' added to it. This means that when
we pop off of this array we are saying that we should be in position zero
for the next line. This is an issue because we don't always want to be
in position 0 after a closing brace.
Example:
```
[[[
]
]
]
```
In the above example the 'spaces_of_nest' array looks like this after
the first line is entered: [0,0,0]. We really want to be indented 4
spaces for the 1st closing brace 2 for the 2nd and 0 for the 3rd. i.e.
we want it to be: [0,2,4].
We also saw this issue with a heredoc inside of an array.
```
[<<FOO]
hello
FOO
```
https://github.com/ruby/irb/commit/80c69c8272
|
|
This commit fixes the check_newline_depth_difference method to multiple
open braces on one line into account. Before this change we were
subtracting from the depth in check_newline_depth_difference on
every open brace. This is the right thing to do if the opening and
closing brace are on the same line. For example in a method definition we
have an opening and closing parentheses we want to add 1 to our depth,
and then remove it.
```
def foo()
end
```
However this isn't the correct behavior when the brace spans multiple
lines. If a brace spans multiple lines we don't want to subtract from
check_newline_depth_difference and we want to treat the braces the same
way as we do `end` and allow check_corresponding_token_depth to pop the
correct depth.
Example of bad behavior:
```
def foo()
[
]
puts 'bar'
end
```
Example of desired behavior:
```
def foo()
[
]
puts 'bar'
end
```
https://github.com/ruby/irb/commit/7dc8af01e0
|
|
If this value is less than zero, then the mask check is guaranteed to
fail as well, so we might as well rely on that.
Notes:
Merged: https://github.com/ruby/ruby/pull/2808
|
|
[Feature #16485][ruby-core:96683]
Notes:
Merged: https://github.com/ruby/ruby/pull/2832
|
|
[Feature #16485][ruby-core:96683]
Notes:
Merged: https://github.com/ruby/ruby/pull/2832
|
|
|
|
|
|
[Bug #16498]
|
|
`Binding#source_location` returns the `__FILE__` when created, and
may not be an absolute or real path. And in the `eval` context
with an explicit file name, `__dir__` also returns that name.
On the other hand, `__FILE__` in `require`d script file has been
expanded at searching the library.
|
|
Try to fix infrequent error:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-sunc/ruby-master/log/20200108T010004Z.fail.html.gz
```
1) Error:
DRbTests::TestDRbSSLCore#test_02_basic_object:
RangeError: "348" is recycled object
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:366:in `_id2ref'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:366:in `to_obj'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1537:in `to_obj'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1856:in `to_obj'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:620:in `recv_request'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:931:in `recv_request'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1665:in `init_with_client'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1677:in `setup_message'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1641:in `perform'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1734:in `block (2 levels) in main_loop'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1730:in `loop'
(drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1730:in `block in main_loop'
/export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/test/drb/drbtest.rb:163:in `test_02_basic_object'
```
|
|
```
.../ruby/test/ruby/test_keyword.rb:3509: warning: assigned but unused variable - bug8993
.../ruby/test/ruby/test_object.rb:83: warning: assigned but unused variable - f
.../ruby/test/ruby/test_object.rb:95: warning: method redefined; discarding old initialize_clone
.../ruby/test/ruby/test_object.rb:84: warning: previous definition of initialize_clone was here
```
|
|
|
|
script_compiled event for TracePoint should not be invoked on
compile error (SyntaxError) because it is not "compiled".
[Bug #16459]
|
|
def foo
''.upca[TAB]
This will be completed to be:
def foo
''.upcase
The indent was gone. This commit fixes the bug.
|
|
This makes it possible to initialize_clone to correctly not freeze
internal state if the freeze: false keyword is passed to clone.
If clone is called with freeze: true or no keyword, do not pass
a second argument to initialize_clone to keep backwards
compatibility.
This makes it so that external libraries that override
initialize_clone but do not support the freeze keyword will fail
with ArgumentError if passing freeze: false to clone. I think that
is better than the current behavior, which succeeds but results in
an unfrozen object with frozen internals.
Fix related issues in set and delegate in stdlib.
Fixes [Bug #14266]
Notes:
Merged: https://github.com/ruby/ruby/pull/2816
|
|
This removes the warning that was added in
3802fb92ff8c83eed3e867db20f72c53932f542d, and switches the behavior
so that the eval does not use the binding's __FILE__ and __LINE__
implicitly.
Fixes [Bug #4352]
Notes:
Merged: https://github.com/ruby/ruby/pull/2816
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2794
|
|
This removes the warnings added in 2.7, and changes the behavior
so that a final positional hash is not treated as keywords or
vice-versa.
To handle the arg_setup_block splat case correctly with keyword
arguments, we need to check if we are taking a keyword hash.
That case didn't have a test, but it affects real-world code,
so add a test for it.
This removes rb_empty_keyword_given_p() and related code, as
that is not needed in Ruby 3. The empty keyword case is the
same as the no keyword case in Ruby 3.
This changes rb_scan_args to implement keyword argument
separation for C functions when the : character is used.
For backwards compatibility, it returns a duped hash.
This is a bad idea for performance, but not duping the hash
breaks at least Enumerator::ArithmeticSequence#inspect.
Instead of having RB_PASS_CALLED_KEYWORDS be a number,
simplify the code by just making it be rb_keyword_given_p().
Notes:
Merged: https://github.com/ruby/ruby/pull/2794
|
|
It is considered a mistake, because calling this method with no
arguments has no effect.
Notes:
Merged: https://github.com/ruby/ruby/pull/2806
|
|
|
|
https://github.com/ruby/irb/commit/1f3a84ab6b
|
|
|
|
The set_auto_indent method calculates the correct number of spaces for
indenting a line. We think there might be a few bugs in this method so
we are testing the current functionality to make sure nothing breaks
when we address those bugs.
Example test failure:
```
1) Failure:
TestIRB::TestRubyLex#test_auto_indent [/Users/Ben/Projects/irb/test/irb/test_ruby_lex.rb:75]:
Calculated the wrong number of spaces for:
def each_top_level_statement
initialize_input
catch(:TERM_INPUT) do
loop do
begin
prompt
unless l = lex
throw :TERM_INPUT if @line == ''
else
.
<10> expected but was
<12>.
```
https://github.com/ruby/irb/commit/752d5597ab
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2800
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2800
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2800
|
|
`NoMethodError` has been raised instead of `FrozenError`.
Notes:
Merged: https://github.com/ruby/ruby/pull/2800
|
|
TestRelineAsReadline#test_input_metachar passes on MinGW
|
|
* MinGW - skip spec in spec/ruby/optional/capi/thread_spec.rb
C-API Thread function rb_thread_call_without_gvl
-- runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO
stops/freezes spec tests
See https://bugs.ruby-lang.org/issues/16265
* MinGW - skip test test/resolv/test_dns.rb
Test times out in CI (both AppVeyor & Actions), cannot repo locally
* MinGW - skip test test/ruby/test_thread_queue.rb
* Add Actions mingw.yml
|
|
* Deciding lambdaness of (f << g) using g
* Use version guards for spec changes
Notes:
Merged-By: XrXr
|
|
https://github.com/ruby/io-console/commit/baaf929041
|
|
This is for 8a705245e55575d4d310a2e956b89a36a5931971.
|