summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2021-02-15* 2021-02-15 [ci skip]git
2021-02-15Add a missing semicolon.Takashi Tamura
Notes: Merged: https://github.com/ruby/ruby/pull/4180
2021-02-14Make global ruby namespace usage explicitMarvin Schmidt
If the use of the ruby namespace isn't prepended by `::` to make it explicit that the global ruby namespace is referenced here, it can clash with other non-global namespace named ruby, e.g. ``` // declaration namespace myproject { namespace ruby { // my ruby classes } } // implementation using namespace myproject; [...] rb_define_method(...); [...] ``` leads to the following error: ``` ../ruby/choice.cc: In function 'void {anonymous}::do_register_choice()': ../ruby/choice.cc:342:9: error: reference to 'ruby' is ambiguous 342 | rb_define_method(c_choices, "each", RUBY_FUNC_CAST(&choices_each), 0); | ^~~~~~~~~~~~~~~~ In file included from ../ruby/choice.cc:20: ../ruby/paludis_ruby.hh:53:15: note: candidates are: 'namespace paludis::ruby { }' 53 | namespace ruby | ^~~~ In file included from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/backward/2/stdalign.h:23, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/defines.h:77, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/ruby.h:23, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby.h:38, from ../ruby/paludis_ruby.hh:44, from ../ruby/choice.cc:20: /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/internal/stdalign.h:92:11: note: 'namespace ruby { }' 92 | namespace ruby { | ^~~~ In file included from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/internal/anyargs.h:83, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/ruby.h:24, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby.h:38, from ../ruby/paludis_ruby.hh:44, from ../ruby/choice.cc:20: ../ruby/choice.cc:342:9: error: '::define' has not been declared 342 | rb_define_method(c_choices, "each", RUBY_FUNC_CAST(&choices_each), 0); | ^~~~~~~~~~~~~~~~ ../ruby/choice.cc:344:9: error: reference to 'ruby' is ambiguous 344 | rb_define_method(c_choices, "find_by_name_with_prefix", RUBY_FUNC_CAST(&choices_find_by_name_with_prefix), 1); | ^~~~~~~~~~~~~~~~ ``` Notes: Merged: https://github.com/ruby/ruby/pull/4185 Merged-By: nobu <nobu@ruby-lang.org>
2021-02-14Fixed codepage for utime [Bug #17626]xtkoba (Tee KOBAYASHI)
Should use the given codepage argument. Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-02-14Set verbose flag at retryingNobuyoshi Nakada
2021-02-14Directory mapping for default gemsNobuyoshi Nakada
To uniform directory structures, sometimes files are gathered in different directory than the upstreams, executable files in `libexec` for instance. Re-map these files to consistent with the upstreams.
2021-02-14Revert following rbinstall.rb changesNobuyoshi Nakada
Because unexpected names are listed in gemspec files. * "Fix gemspec only case" fc56b96b09e477686975c978142e3af9179219cd * "Refined installation of gemspecs placed other than ext and lib" 31f4dec6373c15a58899f8b86e35d48a7d813bf6
2021-02-14Remove binstubs which are generated by `Gem::Installer` now.Vít Ondruch
There is no real reason to carry these around, since they can be generated during the installation. The `Gem::Installer` generates up to date date stubs, where the racc stubs were of older format and regenerated anyway.
2021-02-14Use UnpackedInstaller to install default gems.Vít Ondruch
Use UnpackedInstaller for installation of default gems similarly it is already used to install bundled gems. This allows to reuse RubyGems functionality instead of custom code full of exceptions.
2021-02-14Fix gemspec only caseNobuyoshi Nakada
2021-02-14* 2021-02-14 [ci skip]git
2021-02-14Refined installation of gemspecs placed other than ext and libNobuyoshi Nakada
2021-02-13opt_equality_by_mid for rb_equal_optKoichi Sasada
This patch improves the performance of sequential and parallel execution of rb_equal() (and rb_eql()). [Bug #17497] rb_equal_opt (and rb_eql_opt) does not have own cd and it waste a time to initialize cd. This patch introduces opt_equality_by_mid() to check equality without cd. Furthermore, current master uses "static" cd on rb_equal_opt (and rb_eql_opt) and it hurts CPU caches on multi-thread execution. Now they are gone so there are no bottleneck on parallel execution. Notes: Merged: https://github.com/ruby/ruby/pull/4177
2021-02-13* 2021-02-13 [ci skip]git
2021-02-12[Fixes #17622] Mark and move the previous epPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4175
2021-02-12Thread::Queue.new should accept an Enumerable [Feature #17327]Nobuyoshi Nakada
Enumerable implements #to_a but not #to_array.
2021-02-12Define rb_to_array which converts with to_aNobuyoshi Nakada
2021-02-12correct the result of casecmp? examples [ci skip]Sarun Rattanasiri
Notes: Merged: https://github.com/ruby/ruby/pull/4174 Merged-By: nobu <nobu@ruby-lang.org>
2021-02-11Make a cyclic prepend not modify ancestors for the receiverJeremy Evans
Check for cyclic prepend before making any changes. This requires scanning the module ancestor chain twice, but in general modules do not have large numbers of ancestors. Notes: Merged: https://github.com/ruby/ruby/pull/4165
2021-02-12* 2021-02-12 [ci skip]git
2021-02-12[ruby/irb] Fix inverse separator conditionNobuyoshi Nakada
https://github.com/ruby/irb/commit/33f933196f
2021-02-11Fixed time_t conversion modifiers for debugNobuyoshi Nakada
2021-02-11Merged too-short salt conditions instead of UNREACHABLE_RETURNNobuyoshi Nakada
2021-02-11[DOC] Improved regexp.rdoc [ci skip]Nobuyoshi Nakada
* Sub-sectioned "Repetition" section * Added examples of "Possessive match"
2021-02-11Comment in sh needs to be the beginning of a wordNobuyoshi Nakada
2021-02-11[ruby/irb] The command "irb_info" should show RUBY_PLATFORMaycabta
https://github.com/ruby/irb/commit/39d1cd874f
2021-02-11[ruby/irb] Suppress colorize on Windows testsaycabta
https://github.com/ruby/irb/commit/5be9354cf9
2021-02-11[ruby/irb] Suppress error when File::ALT_SEPARATOR is nilaycabta
https://github.com/ruby/irb/commit/96accf3b95
2021-02-11The Queue constructor should take an initial set of objectsChris Seaton
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/4140 Merged-By: nobu <nobu@ruby-lang.org>
2021-02-11Do not run File.write while Ractors are runningTakashi Kokubun
also make sure all local variables have the __bmdv_ prefix.
2021-02-10Add a benchmark-driver runner for Ractor (#4172)Takashi Kokubun
* Add a benchmark-driver runner for Ractor * Process.clock_gettime(Process:CLOCK_MONOTONIC) could be slow in Ruby 3.0 Ractor * Fetching Time could also be slow * Fix a comment * Assert overriding a private method Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-02-11Fix 404 linkS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4169
2021-02-10Update class documentation for StringScannerJeremy Evans
The [] wasn't being displayed, and try to fix formatting for bol? and << (even if they aren't linked). Fixes [Bug #17620]