Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
[Feature #13557]
Setting the backtrace with an array of strings is lossy. The resulting
exception will return nil on `#backtrace_locations`.
By accepting an array of `Backtrace::Location` instance, we can rebuild
a `Backtrace` instance and have a fully functioning Exception.
Co-Authored-By: Étienne Barrié <[email protected]>
|
|
|
|
[Feature #16495]
|
|
|
|
Before this commit, the test fails with RGENGC_CHECK_MODE enabled:
TestException#test_detailed_message_under_gc_compact_stress [test/ruby/test_exception.rb:1466]:
<"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" +
"\e[1mbar\e[m\n" +
"\e[1mbaz\e[m"> expected but was
<"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" +
"\e[1m\x00\x00\x00\x00\x00\x00\x00\e[m">.
|
|
assert_separately adds --disable=gems so we don't need to add
--disable-gems when calling assert_separately.
Notes:
Merged: https://github.com/ruby/ruby/pull/8162
|
|
[Feature #19755]
Before (in /tmp/test.rb):
```ruby
Object.class_eval("p __FILE__") # => "(eval)"
```
After:
```ruby
Object.class_eval("p __FILE__") # => "(eval at /tmp/test.rb:1)"
```
This makes it much easier to track down generated code in case
the author forgot to provide a filename argument.
Notes:
Merged: https://github.com/ruby/ruby/pull/8070
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7387
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6960
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6779
|
|
Raise a `SyntaxError` with the parser error message, in the case
reading from a file instead of the `-e` option or standard input. So
syntax_suggest can get the message from the caught error.
Notes:
Merged: https://github.com/ruby/ruby/pull/6778
|
|
Build and store the error message with `#detailed_message` before
terminating all Ractors, then show the message later.
Notes:
Merged: https://github.com/ruby/ruby/pull/6778
|
|
So that `SyntaxError#detailed_message` will be used also in the case
exiting by such syntax error.
Notes:
Merged: https://github.com/ruby/ruby/pull/6771
|
|
This reverts commit b9f030954a8a1572032f3548b39c5b8ac35792ce.
[Bug #18170]
|
|
* So deprecated methods/constants/functions are dealt with early,
instead of many tests breaking suddenly when removing a deprecated
method/constant/function.
* Follows https://bugs.ruby-lang.org/issues/17591
Notes:
Merged: https://github.com/ruby/ruby/pull/6321
|
|
This reverts commit 9d927204e7b86eb00bfd07a060a6383139edf741.
Notes:
Merged: https://github.com/ruby/ruby/pull/5981
|
|
... only when the message string has a newline.
`p StandardError.new("foo\nbar")` now prints `#<StandardError: "foo\nbar">'
instead of:
#<StandardError:
bar>
[Bug #18170]
Notes:
Merged: https://github.com/ruby/ruby/pull/4857
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5676
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5516
|
|
[Feature #18367]
Notes:
Merged: https://github.com/ruby/ruby/pull/5516
|
|
|
|
Previously this was being incorrectly swapped with TAG_RAISE in the next
line. This would end up checking the T_IMEMO throw_data to the exception
handling (which calls Module#===). This happened to not break existing
tests because Module#=== returned false when klass is NULL.
This commit handles throw from require correctly by jumping to the tag
retaining the TAG_THROW state.
Notes:
Merged: https://github.com/ruby/ruby/pull/5513
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5453
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5453
|
|
Check that there is a method entry for the method before passing
it to rb_method_entry_arity.
Fixes [Bug #18458]
Notes:
Merged: https://github.com/ruby/ruby/pull/5391
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5352
|
|
Already these had been announced to be removed in 3.2.
Notes:
Merged: https://github.com/ruby/ruby/pull/5348
|
|
test-unit migration
|
|
This test appears to cause failures in some environments.
|
|
Solaris 11 CI times out instead of raising NoMemoryError for large
allocations, so it cannot test ensure after NoMemoryError.
|
|
|
|
VM patch from wanabe.
Test based on example from buzztaiki (Taiki Sugawara).
Test fails when compiles with -DRUBY_DEBUG, as that can
can use rb_bug instead of NoMemoryError, which doesn't
allow testing this case. Test also fails on MingW, as
RangeError is used instead of NoMemoryError. Skip the
test in either case.
Fixes [Bug #15779]
Notes:
Merged: https://github.com/ruby/ruby/pull/4577
|
|
|
|
609de71f043e8ba34f22b9993e444e2e5bb05709 fixes the issue by using
`throw` insn if `ensure` is used. However, that patch introduce
additional `throw` even if it is not needed. This patch solves
the issue.
This issue is pointed by @mame.
Notes:
Merged: https://github.com/ruby/ruby/pull/4507
|
|
|
|
add_ensure_iseq() adds ensure block to the end of
jump such as next/redo/return. However, if the rescue
cause are in the body, this rescue catches the exception
in ensure clause.
iter do
next
rescue
R
ensure
raise
end
In this case, R should not be executed, but executed without this patch.
Fixes [Bug #13930]
Fixes [Bug #16618]
A part of tests are written by @jeremyevans https://github.com/ruby/ruby/pull/4291
Notes:
Merged: https://github.com/ruby/ruby/pull/4399
|
|
This speeds up all instance variable access, even when not in
verbose mode. Uninitialized instance variable warnings were
rarely helpful, and resulted in slower code if you wanted to
avoid warnings when run in verbose mode.
Implements [Feature #17055]
Notes:
Merged: https://github.com/ruby/ruby/pull/3879
|
|
|
|
This reverts commit 1a5205536f0c0d6021450b11722919211847df86.
|
|
|
|
In general accepting arbitrary keywords is a bad idea unless you are
delegating keywords or acting on arbitrary keywords. In this case,
the category keyword is ignored, and it's less error prone to not
ignore all keywords.
Notes:
Merged: https://github.com/ruby/ruby/pull/3508
|
|
PR https://github.com/ruby/ruby/pull/3418 added a category to
`rb_warn_deprecated_to_remove` but not to `rb_warn_deprecated`. This
adds the same code to `rb_warn_deprecated` so that those warnings also
get a category.
This change also adds tests for `rb_warn_deprecated` and updates the
tests for `rb_warn_deprecated_to_remove` to have clearer names.
I've fixed the call to `rb_method_entry` as we need to be using the
instance method, not singleton.
Feature: https://bugs.ruby-lang.org/issues/17122
Notes:
Merged: https://github.com/ruby/ruby/pull/3505
|
|
This change adds a `category` kwarg to make it easier to monkey patch
`Warning.warn`. Warnings already have a category, but that warning isn't
exposed. This implements a way to get the category so that warnings with
a specific category, like deprecated, can be treated differently than
other warnings in an application.
The change here does an arity check on the method to support backwards
compatibility for applications that may already have a warning monkey
patch.
For our usecase we want to `raise` for deprecation warnings in order to
get the behavior for the next Ruby version. For example, now that we
fixed all our warnings and deployed Ruby 2.7 to production, we want to
be able to have deprecation warnings behave like they would in 3.0: raise
an error. For other warnings, like uninialized constants, that behavior
won't be removed from Ruby in the next version, so we don't need to
raise errors.
Co-authored-by: Aaron Patterson <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/3418
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3320
|
|
|