Age | Commit message (Collapse) | Author |
|
This reverts commit f2d7461e85053cb084e10999b0b8019b0c29e66e.
Some CI machines are reporting issues with backtrace_mark, so I'm
going to revert this for now.
|
|
|
|
Previously, backtrace_each fully populated the rb_backtrace_t with all
backtrace frames, even if caller only requested a partial backtrace
(e.g. Kernel#caller_locations(1, 1)). This changes backtrace_each to
only add the requested frames to the rb_backtrace_t.
To do this, backtrace_each needs to be passed the starting frame and
number of frames values passed to Kernel#caller or #caller_locations.
backtrace_each works from the top of the stack to the bottom, where the
bottom is the current frame. Due to how the location for cfuncs is
tracked using the location of the previous iseq, we need to store an
extra frame for the previous iseq if we are limiting the backtrace and
final backtrace frame (the first one stored) would be a cfunc and not
an iseq.
To limit the amount of work in this case, while scanning until the start
of the requested backtrace, for each iseq, store the cfp. If the first
backtrace frame we care about is a cfunc, use the stored cfp to find the
related iseq. Use a function pointer to handle the storage of the cfp
in the iteration arg, and also store the location of the extra frame
in the iteration arg.
backtrace_each needs to return int instead of void in order to signal
when a starting frame larger than backtrace size is given, as caller
and caller_locations needs to return nil and not the empty array in
these cases.
To handle cases where a range is provided with a negative end, and the
backtrace size is needed to calculate the result to pass to
rb_range_beg_len, add a backtrace_size static function to calculate
the size, which copies the logic from backtrace_each.
As backtrace_each only adds the backtrace lines requested,
backtrace_to_*_ary can be simplified to always operate on the entire
backtrace.
Previously, caller_locations(1,1) was about 6.2 times slower for an
800 deep callstack compared to an empty callstack. With this new
approach, it is only 1.3 times slower. It will always be somewhat
slower as it still needs to scan the cfps from the top of the stack
until it finds the first requested backtrace frame.
Fixes [Bug #17031]
Notes:
Merged: https://github.com/ruby/ruby/pull/3357
|
|
Extension string stored in `ARGF.inplace` is created using an api
designed for C string constants to create a Ruby string that
points at another Ruby string. When the original string is swept,
the extension string gets corrupted.
Reproduction script (on MacOS):
```ruby
#!/usr/bin/ruby -pi.bak
BEGIN {
GC.start(full_mark: true)
arr = []
1000000.times do |x|
arr << "fooo#{x}"
end
}
puts "hello"
```
Co-Authored-By: Matt Valentine-House <31869+eightbitraptor@users.noreply.github.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/3409
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Use BEG(0) instead of the result of rb_reg_search to handle the cases
when the separator Regexp contains /\K/ (lookbehind) operator.
Fixes [Bug #17113]
Notes:
Merged: https://github.com/ruby/ruby/pull/3407
|
|
|
|
`OpenSSL::TestX509Store#test_verify` has been failing intermittently on
CI about once a day:
- http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3121244
- http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3117661
- http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111684
According to the test:
> OpenSSL uses time(2) while Time.now uses clock_gettime(CLOCK_REALTIME),
> and there may be difference.
This difference is could be the cause for the flaky failures. Let's see
if giving the certificate more room solves the problem.
In any case, I will revert this in a week. I think changes to these
should go to https://github.com/ruby/openssl/?
Notes:
Merged: https://github.com/ruby/ruby/pull/3406
|
|
|
|
|
|
|
|
Clang 12 warns "suspicious concatenation of string literals in an array
initialization", which is rather annoying than useful in this context.
Notes:
Merged: https://github.com/ruby/ruby/pull/3405
|
|
LLVM made release/11.x branch. Its master is now version 12.
Notes:
Merged: https://github.com/ruby/ruby/pull/3405
|
|
Do not repeat yourself.
Notes:
Merged: https://github.com/ruby/ruby/pull/3405
|
|
A single quote "is representable either by itself or by the escape
sequence", according to ISO/IEC 9899 (checked all versions). So this is
not a bug fix. But the generated output is a bit readable without
backslashes.
Notes:
Merged: https://github.com/ruby/ruby/pull/3405
|
|
This documents how methods for core classes and classes in the
standard library should be documented.
Co-authored-by: Eric Hodel <drbrain@segment7.net>
Notes:
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
Methods:
drop
drop_while
any?
all?
none?
one?
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
Encoding of C-sources can not be determined, and non-ASCII code
are often warned by localized compilers.
|
|
`key` is not used outside this assertion.
|
|
Calls with a constant argument should be optimized away.
|
|
|
|
|
|
|
|
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
- When NDEBUG is defined that shall be honoured.
- When RUBY_DEBUG is defined that shall be honoured.
- When both are defined and they conflict, warnings shall be rendered.
- When nothing is specified, nothing shall happen.
Notes:
Merged-By: shyouhei <shyouhei@ruby-lang.org>
|
|
* Revert "mswin build - install src zlib files after checkout"
This reverts commit b6175c9e4fe25b978252d8998fe791d65d998fc5.
* Revert "mswin build - install src zlib files"
This reverts commit bf758ef8b4e2895bf71a611a7ab2a4f236e260ea.
Notes:
Merged-By: hsbt <hsbt@ruby-lang.org>
|
|
|
|
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111684
|
|
for example:
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3111251
http://ci.rvm.jp/results/trunk-random1@phosphorus-docker/3109195
|
|
* Fix debug documents to match Thread#to_s change (Feature #16412 ticket)
* TracePoint#inspect returns "... file:line" (Feature #16513)
* Guard older version of Ruby in Tracepoint inspection tests
* Focus on current thread only when running TracePoint inspection test
Notes:
Merged-By: ko1 <ko1@atdot.net>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3380
|
|
|
|
* Enhanced documentation for Array#repeated_combination
* Enhanced documentation for Array#repeated_combination
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* Enhanced documentation for Array#repeated_permutation
* Enhanced documentation for Array#repeated_permutation
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
|
|
[ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/3389
|
|
I accidentally added this in 35ba2783fe6b3316a6bbc6f00bf975ad7185d6e0,
and it's making the size of RVALUE be too big. I'm sorry! orz
Notes:
Merged: https://github.com/ruby/ruby/pull/3388
|
|
|
|
Walking the heap can inadvertently pin objects. Only mark the object's
pin bit if the mark_func_data pointer is NULL (similar to the mark bits)
Notes:
Merged: https://github.com/ruby/ruby/pull/3387
|
|
Gem::Specification#add_development_dependency.
https://github.com/ruby/weakref/commit/10d547ba12
|
|
https://github.com/ruby/ostruct/commit/00e8fe3df2
|
|
https://github.com/ruby/net-http/commit/5ae9620fbc
|
|
invalid_servername is not a valid name in an SSL request due to
the use of the underscore, and LibreSSL 3.2.0 will raise an
exception for this. These tests are not testing the allowed
characters in the server name, but how net/http handles cases where
the server name provided does not match the IP address you are
trying to connect to, so I think it's better to just modify the
tests to use a correct format.
While here, fix a typo in a test name, and use better code in the
ensure block so the same test doesn't issue both a failure and an
error.
https://github.com/ruby/net-http/commit/0e8dc91120
|
|
https://github.com/ruby/cgi/commit/8a86536e94
|
|
|
|
|
|
|