summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-02-22* 2021-02-22 [ci skip]git
2021-02-22Send :fiber_switch event for almost every fiber_switch (#4207)nicholas a. evans
With this patch, TracePoint receives a `:fiber_switch` event for _almost_ every fiber switch. Previously, it would not be sent when an exception was going to be raised. Now the event should only be blockable by an interrupt (including `Thread#raise`) or a fatal error. Additionally, interrupts will now be checked on the return fiber _before_ re-raising the terminating unhandled exception. And a fiber that terminates with an unhandled exception no longer creates a pending interrupt on its thread. The exception will be raised in the return fiber the same way as `Fiber#raise`: using `cont.value` with `cont.argc == -1` I moved `rb_exc_raise` from `fiber_store` to the end of `fiber_switch` after _all_ of the other cleanup code: `fiber_stack_release`, `th->blocking` increment, `RUBY_VM_CHECK_INTS`, and `EXEC_EVENT_HOOK`. It seems to me that skipping those other cleanup steps may have also resulted in other bugs. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-02-21[ruby/reline] Use UTF-8 only for width calc, rest uses original encodingaycabta
I confirmed that libvterm supports only which are UTF-8, US ASCII, UK, and DEC graphics by reading source code, so can't test this patch by yamatanoorogi gem through vterm gem for now. This fixes ruby/irb#190. https://github.com/ruby/reline/commit/44596c0cc7
2021-02-21[ruby/reline] check ENABLE_VIRTUAL_TERMINAL_PROCESSING flag and switch eof ↵Yoshinao Muramatu
processing https://github.com/ruby/reline/commit/3535676689
2021-02-21[ruby/reline] We still need support new and legacy behavior.Yoshinao Muramatu
Revert "Support for change in Windows-specific behavior at eol" This reverts commit cad4de6ee841b43f3f0e441626f9415c3eda0f82. https://github.com/ruby/reline/commit/646587fc2c
2021-02-21[ruby/reline] Add a test for suppressing crash when dynamic prompt returns emptyaycabta
ref. https://github.com/ruby/reline/pull/262 https://github.com/ruby/reline/commit/b98bc3c329
2021-02-21[ruby/reline] Move script files for yamatanooroti testsaycabta
https://github.com/ruby/reline/commit/03031b885d
2021-02-21[ruby/reline] Avoid tripping over nil promptEamonn Webster
https://github.com/ruby/reline/commit/d4d9d3e3d4
2021-02-21[ruby/reline] Return 1 when char width not foundaycabta
This fixes ruby/reline#261. https://github.com/ruby/reline/commit/3cf1213014
2021-02-21* 2021-02-21 [ci skip]git
2021-02-20MSys is a variant of CygwinNobuyoshi Nakada
2021-02-20[Win32] Fixed preprocessed file pathNobuyoshi Nakada
Output preprocessed files under the corresponding directory to the source files.
2021-02-20Make String#{strip,lstrip}{,!} strip leading NUL bytesJeremy Evans
The documentation already specifies that they strip whitespace and defines whitespace to include null. This wraps the new behavior in the appropriate guards in the specs, but does not specify behavior for previous versions, because this is a bug that could be backported. Fixes [Bug #17467] Notes: Merged: https://github.com/ruby/ruby/pull/4164
2021-02-19Improve performance some Numeric methods [Feature #17632] (#4190)S.H
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-02-19Fix link msdn.microsoft.com (#4202)S.H
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-02-19Remove mentions of Bignum in time.cJeremy Evans
Move section on internal details out of the class-level documentation, since users do not need to know that. Update it to use Integer(T_BIGNUM) instead of Bignum. Fixes [Misc #17580]
2021-02-19Fix backtrace to not skip frames with iseq without pcJeremy Evans
Previously, frames with iseq but no pc were skipped (even before the refactoring in 3b24b7914c16930bfadc89d6aff6326a51c54295). Because the entire backtrace was procesed before the refactoring, this was handled by using later frames instead. However, after the refactoring, we need to handle those frames or they get lost. Keep two iteration counters when iterating, one for the desired backtrace size (so we generate the desired number of frames), and one for the actual backtrace size (so we don't process off the end of the stack). When skipping over an iseq frame with no pc, decrement the counter for the desired backtrace, so it will continue to process the expected number of backtrace frames. Fixes [Bug #17581] Notes: Merged: https://github.com/ruby/ruby/pull/4120
2021-02-20* 2021-02-20 [ci skip]git
2021-02-20Fixed fallback ENABLE_VIRTUAL_TERMINAL_PROCESSING value [Bug #17639]YO4 (Yoshinao Muramatsu)
2021-02-19Fix typo [ci skip]Shugo Maeda
2021-02-19invalidate negative cache any time.Koichi Sasada
negative cache on a class which does not have subclasses was not invalidated, but it should be invalidated because other classes can cache this negative cache. [Bug #17553] Notes: Merged: https://github.com/ruby/ruby/pull/4201
2021-02-19show more information about imemo_mentKoichi Sasada
rb_obj_info(obj) (rp(obj)) doesn't show enough information for non-iseq methods, so this patch shows more. Notes: Merged: https://github.com/ruby/ruby/pull/4201
2021-02-19* 2021-02-19 [ci skip]git
2021-02-19ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644]Shugo Maeda
2021-02-18Ractor.allocate should not be allowedKoichi Sasada
Ractor.allocate and Ractor#dup should not be allowed like Thread. [Bug #17642] Notes: Merged: https://github.com/ruby/ruby/pull/4198
2021-02-18[ruby/readline-ext] Initialize libedit before managing the historyNobuyoshi Nakada
Fixes https://bugs.ruby-lang.org/issues/17629 https://github.com/ruby/readline-ext/commit/250d6787ed
2021-02-18[ruby/readline-ext] Use omitNobuyoshi Nakada
https://github.com/ruby/readline-ext/commit/f6dff0a9f6
2021-02-18sync check_rvalue_consistency_force()Koichi Sasada
check_rvalue_consistency_force() uses is_pointer_to_heap() and it should be synchronized with other ractors. [Bug #17636] Notes: Merged: https://github.com/ruby/ruby/pull/4194
2021-02-18clear RVALUE on NEWOBJ event.Koichi Sasada
NEWOBJ event is called without clearing RVALUE values (v1, v2, v3). This patch clear them before NEWOBJ tracepoint internal hook. [Bug #17599] Notes: Merged: https://github.com/ruby/ruby/pull/4196
2021-02-18Update bundled_gemsNobuyoshi Nakada
2021-02-18* 2021-02-18 [ci skip]git
2021-02-18sync GC rest if neededKoichi Sasada
marking requires a barrier (stop all Ractors) and gc_enter() does it. However, it doesn't check rest event which can start marking. [Bug #17599] Notes: Merged: https://github.com/ruby/ruby/pull/4195
2021-02-17Removed no-longer used variableNobuyoshi Nakada
2021-02-16Remove unreachable if statement in gc_page_sweepPeter Zhu
This if statement is not reachable because `was_compacting` cannot be true when `heap->compact_cursor` is NULL. Notes: Merged: https://github.com/ruby/ruby/pull/4192
2021-02-17* 2021-02-17 [ci skip]git
2021-02-16Eliminate useless catch tables and nops from lambdasAaron Patterson
Before this commit: ``` $ ruby --dump=insn -e '1.times { |x| puts x }' == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,22)> (catch: FALSE) == catch table | catch type: break st: 0000 ed: 0004 sp: 0000 cont: 0004 | == disasm: #<ISeq:block in <main>@-e:1 (1,8)-(1,22)> (catch: FALSE) | == catch table | | catch type: redo st: 0001 ed: 0006 sp: 0000 cont: 0001 | | catch type: next st: 0001 ed: 0006 sp: 0000 cont: 0006 | |------------------------------------------------------------------------ | local table (size: 1, argc: 1 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] x@0<Arg> | 0000 nop ( 1)[Bc] | 0001 putself [Li] | 0002 getlocal_WC_0 x@0 | 0004 opt_send_without_block <calldata!mid:puts, argc:1, FCALL|ARGS_SIMPLE> | 0006 leave [Br] |------------------------------------------------------------------------ 0000 putobject_INT2FIX_1_ ( 1)[Li] 0001 send <calldata!mid:times, argc:0>, block in <main> 0004 leave ``` After this commit: ``` > ruby --dump=insn -e '1.times { |x| puts x }' == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,22)> (catch: FALSE) 0000 putobject_INT2FIX_1_ ( 1)[Li] 0001 send <calldata!mid:times, argc:0>, block in <main> 0004 leave == disasm: #<ISeq:block in <main>@-e:1 (1,8)-(1,22)> (catch: FALSE) local table (size: 1, argc: 1 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] x@0<Arg> 0000 putself ( 1)[LiBc] 0001 getlocal_WC_0 x@0 0003 opt_send_without_block <calldata!mid:puts, argc:1, FCALL|ARGS_SIMPLE> 0005 leave ``` Fixes [ruby-core:102418] [Feature #17613] Co-Authored-By: Alan Wu <XrXr@users.noreply.github.com> Notes: Merged: https://github.com/ruby/ruby/pull/4125
2021-02-16Parse "-00:00" as UTC for the round-trip [Feature #17544]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4075
2021-02-16UTC zone should be still "+00:00" [Feature #17544]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4075
2021-02-16strftime.c: support unknown offset UTC in RFC 3339 [Feature #17544]Nobuyoshi Nakada
In RFC 3339, -00:00 is used for the time in UTC is known, but the offset to local time is unknown. Support that representation by `-` flag for `z`. Notes: Merged: https://github.com/ruby/ruby/pull/4075
2021-02-16Update bundled_gemsNobuyoshi Nakada
2021-02-16Make the commit of updated bundled_gems fileNobuyoshi Nakada
2021-02-16Fix a spec failureKazuhiro NISHIYAMA
http://ci.rvm.jp/logfiles/brlog.trunk-test.20210216-182358 ``` 1) $LOAD_PATH.resolve_feature_path raises LoadError if feature cannot be found FAILED Expected LoadError but no exception was raised (nil was returned) /tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1275:in `block (3 levels) in <top (required)>' /tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1259:in `block in <top (required)>' /tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1258:in `<top (required)>' ```
2021-02-16Fix a failureKazuhiro NISHIYAMA
http://ci.rvm.jp/results/trunk-test@ruby-sky1/3359644 ``` : 1) : TestEncoding#test_nonascii_library_path [/tmp/ruby/v3/src/trunk-test/test/ruby/test_encoding.rb:157]: : Exception(LoadError) with message matches to /\[Bug #16382\]/. ```
2021-02-16Add NEWS entry for [Feature #16043]Kazuhiro NISHIYAMA
2021-02-16* 2021-02-16 [ci skip]git
2021-02-16`$LOAD_PATH.resolve_feature_path` should not raiseDavid Rodríguez
I think it's more friendly and easier to work with to return `nil` when the feature is not found in the $LOAD_PATH. Notes: Merged: https://github.com/ruby/ruby/pull/2317
2021-02-15[DOC] NEWS for Thread::Backtrace.limit [Feature #17479]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4187
2021-02-15Added Thread::Backtrace.limit [Feature #17479]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4187
2021-02-15Added tests for --backtrace-limit optionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4187
2021-02-15supports for stack protection for haiku.David Carlier
Notes: Merged: https://github.com/ruby/ruby/pull/4186