Ruby Issue Tracking System: Issueshttps://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112024-03-19T09:10:29ZRuby Issue Tracking System
Redmine Ruby master - Feature #20347 (Assigned): Separate docs task from allhttps://redmine.ruby-lang.org/issues/203472024-03-19T09:10:29Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>I would like to migrate RDoc as bundled gems at Ruby 3.5.</p>
<p>We need to handle <code>install-doc</code> and related task with that. I removed <code>docs</code> task from <code>all</code> and re-order <code>docs</code> task at <code>install-all</code>.</p>
<p><a href="https://github.com/ruby/ruby/pull/10282" class="external">https://github.com/ruby/ruby/pull/10282</a></p>
<p>It works with RDoc as bundled gems. We can keep current behavior with this migration.</p>
<p>I hope to merge changes for <code>all</code> task and re-order <code>install-all</code> task at Ruby 3.4.</p>
<p><a href="https://github.com/ruby/ruby/pull/10282/commits/b160083175aed062c320b8d76eafe1c8706309d4" class="external">https://github.com/ruby/ruby/pull/10282/commits/b160083175aed062c320b8d76eafe1c8706309d4</a></p>
<p>After that, the default <code>make</code> task will not generate rdoc. We need to add <code>make all docs</code> for that.</p> Ruby master - Feature #20309 (Assigned): Bundled gems for Ruby 3.5https://redmine.ruby-lang.org/issues/203092024-02-27T22:16:20Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>I propose migrate the following default gems to bundled gems at Ruby 3.5. So, It means users will get warnings if users try to load them.</p>
<p>(Update with 2024/03/14)</p>
<ul>
<li>ostruct
<ul>
<li>I make ostruct as optional on json at <a href="https://github.com/flori/json/pull/565" class="external">https://github.com/flori/json/pull/565</a>
</li>
</ul>
</li>
<li>logger
<ul>
<li>activesupport needs to add logger to its dependency same as bigdecimal, drb or etc.</li>
</ul>
</li>
<li>fiddle</li>
<li>pstore</li>
<li>win32ole</li>
</ul>
<p>I have a plan to migrate the following default gems too. But I need to more feedback from other committers about them.</p>
<ul>
<li>irb
<ul>
<li>We need to consider how works <code>binding.irb</code> after Ruby 3.5.</li>
<li>I consider to use <code>irb</code> without Gemfile.</li>
</ul>
</li>
<li>reline</li>
<li>readline (wrapper file for readline-ext and reline)</li>
<li>io-console
<ul>
<li>rubygems uses that. Should we make optional that?</li>
</ul>
</li>
<li>open-uri</li>
<li>yaml (wrapper file for psych)
<ul>
<li>syck is retired today. I'm not sure what people uses <code>psych</code> directly, not <code>yaml</code>.</li>
</ul>
</li>
<li>rdoc
<ul>
<li>We need to change build task like download rdoc gem before document generation.
<ul>
<li>extract <code>make doc</code> from <code>make all</code> and invoke <code>make doc</code> before <code>make install</code>.</li>
</ul>
</li>
<li>or We make document generation is optional from Ruby 3.5
<ul>
<li>We explicitly separate <code>make install</code> and <code>make install-doc</code>
</li>
</ul>
</li>
</ul>
</li>
<li>un
<ul>
<li>
<code>ruby -run</code> is one of cool feature of Ruby. Should we avoid uninstalling <code>un</code> gem?</li>
<li>mkmf uses <code>ruby -run</code> for that. I need to investigate that.</li>
</ul>
</li>
<li>singleton
<ul>
<li>This is famous design pattern. Should we enforce users add them to their Gemfile?</li>
</ul>
</li>
<li>forwadable
<ul>
<li>
<code>reline</code> needs to add forwardable their <code>runtime_dependency</code> after migration.</li>
</ul>
</li>
<li>weakref
<ul>
<li>I'm not sure how impact after migrating bundled gems.</li>
</ul>
</li>
<li>fcntl
<ul>
<li>Should we integrate these constants into ruby core?</li>
</ul>
</li>
</ul>
<p>I would like to migrate <code>ipaddr</code> and <code>uri</code> too. But these are used by webrick that is mock server for our test suite. We need to rewrite <code>webrick</code> with <code>TCPSocker</code> or extract <code>ipaddr</code> and <code>uri</code> dependency from <code>webrick</code></p>
<p>Other default gems depend on our build process or other libraries deeply. I will update this proposal if I could extract them from default gems.</p> Ruby master - Feature #20187 (Closed): Bundled gems at Ruby 3.4https://redmine.ruby-lang.org/issues/201872024-01-16T08:39:11Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>This ticket is for tracking bundled gems status at Ruby 3.4.</p>
<p>I added warnings for bundled gems of Ruby 3.3 at <a href="https://bugs.ruby-lang.org/issues/19351" class="external">https://bugs.ruby-lang.org/issues/19351</a> and <a href="https://bugs.ruby-lang.org/issues/19776" class="external">https://bugs.ruby-lang.org/issues/19776</a>.</p>
<p>I started to extract(promote) target libraries to bundled gems. These are:</p>
<ul>
<li>abbrev</li>
<li>base64</li>
<li>bigdecimal</li>
<li>csv</li>
<li>drb</li>
<li>getoptlong</li>
<li>mutex_m</li>
<li>nkf</li>
<li>observer</li>
<li>resolv-replace</li>
<li>rinda</li>
<li>syslog</li>
</ul> Ruby master - Bug #20065 (Closed): cannot require "net/smtp" with Ruby3.3.0-rc1 and bundler 2.5.0...https://redmine.ruby-lang.org/issues/200652023-12-14T14:31:35Zs3fxn (s3 fxn)
<p>$ ruby -v<br>
ruby 3.3.0rc1 (2023-12-11 master a49643340e) [x86_64-linux]</p>
<p>$ bundle -v<br>
Bundler version 2.5.0.dev</p>
<p>$ bundle init<br>
$ bundle add net-smtp<br>
$ bundle exec ruby -e 'require "net/smtp"'<br>
-e:1: warning: net/smtp was loaded from the standard library, but is not part of the default gems since Ruby 3.1.0. Add net-smtp to your Gemfile or gemspec.</p>
<p>$ tail -1 Gemfile<br>
gem "net-smtp", "~> 0.4.0"</p> Ruby master - Bug #20060 (Closed): bundled_gems.rb is not working with Bootsnaphttps://redmine.ruby-lang.org/issues/200602023-12-12T00:00:35Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>Addressed from <a href="https://github.com/ruby/ruby/pull/9163#issuecomment-1850924893" class="external">https://github.com/ruby/ruby/pull/9163#issuecomment-1850924893</a></p>
<p><code>bundled_gems.rb</code> of 3.3.0-rc1 couldn't handle full paths by Bootsnap.</p>
<pre><code>$ rails new example
(snip)
rails importmap:install
bin/rails aborted!
ArgumentError: comparison of String with nil failed (ArgumentError)
msg = " #{RUBY_VERSION < SINCE[gem] ? "will no longer be" : "is not"} part of the default gems since Ruby #{SINCE[gem]}."
(snip)
</code></pre>
<p>It's working with DISABLE_BOOTSNAP=1. But we should resolve it with under the bootsnap.</p> Ruby master - Bug #20058 (Closed): `warning: bigdecimal/util is found in bigdecimal` even if the ...https://redmine.ruby-lang.org/issues/200582023-12-11T09:21:27Zyahonda (Yasuo Honda)yasuo.honda@gmail.com
<p><code>warning: bigdecimal/util is found in bigdecimal</code> warning since <a href="https://github.com/ruby/ruby/commit/cc9826503d989df877adbcd94d39a6ff78d0b785" class="external">https://github.com/ruby/ruby/commit/cc9826503d989df877adbcd94d39a6ff78d0b785</a></p>
<a name="Steps-to-reproduce"></a>
<h3 >Steps to reproduce<a href="#Steps-to-reproduce" class="wiki-anchor">¶</a></h3>
<ul>
<li><code>foo.rb</code></li>
</ul>
<pre><code># frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails", branch: "main"
end
require "active_support"
require "minitest/autorun" # https://github.com/minitest/minitest/commit/5f5c2111f36658fd2636b108b8327ce4b2f3cf8d will resolve `warning: mutex_m was loaded from the standard library,`
# This require will raise `warning: bigdecimal/util is found in bigdecimal`
require "bigdecimal/util"
</code></pre>
<a name="Expected-behavior"></a>
<h3 >Expected behavior<a href="#Expected-behavior" class="wiki-anchor">¶</a></h3>
<p>No <code>warning: bigdecimal/util is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.</code> warnings because Rails has already has <code>add_dependency "bigdecimal"</code><br>
<a href="https://github.com/rails/rails/blob/main/activesupport/activesupport.gemspec#L44" class="external">https://github.com/rails/rails/blob/main/activesupport/activesupport.gemspec#L44</a></p>
<a name="Actual-behavior"></a>
<h3 >Actual behavior<a href="#Actual-behavior" class="wiki-anchor">¶</a></h3>
<p><code>warning: bigdecimal/util is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.</code> appears.</p>
<p>Note: <code>warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec.</code> will be addressed by minitest.</p>
<pre><code>$ ruby -v ; ruby foo.rb
ruby 3.3.0dev (2023-12-08T11:25:04Z master cc9826503d) [x86_64-linux]
Fetching https://github.com/rails/rails.git
Resolving dependencies...
Fetching gem metadata from https://rubygems.org/..........
/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/bundler/gems/rails-89d8569abe25/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb:4: warning: bigdecimal/util is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.
/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/gems/minitest-5.20.0/lib/minitest.rb:3: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec.
Run options: --seed 37509
# Running:
Finished in 0.001073s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
$
</code></pre> Ruby master - Misc #20032 (Closed): Propose @kjtsanaktsidis as a commiterhttps://redmine.ruby-lang.org/issues/200322023-11-30T19:59:22Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<p>I'd like to propose <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/10173">@kjtsanaktsidis (KJ Tsanaktsidis)</a> as a committer, with a focus on bug triaging and fixing. During RubyKaigi 2023, KJ expressed interest in helping triage and fix bugs, and since then, he has fixed numerous bugs. What's most impressive about KJ's contributions is the difficulty of the bugs he has fixed, and the wide range of areas in which he has fixed bugs (GC, threading, FreeBSD support, ractors, rubygems, extensions, tests, old bugs, etc.).</p>
<p>Here is a list of bugs KJ has fixed:</p>
<ul>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TestGCCompact#test_moving_hashes_down_size_pools is flaky (Closed)" href="https://redmine.ruby-lang.org/issues/20021">#20021</a></li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Seemingly require causes segfault?? (Closed)" href="https://redmine.ruby-lang.org/issues/19994">#19994</a></li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: IPV6 nameserver issues: "Protocol not supported - socket(2) - udp" (Closed)" href="https://redmine.ruby-lang.org/issues/19928">#19928</a></li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Thread#native_thread_id is incorrectly cached across fork on Linux (Closed)" href="https://redmine.ruby-lang.org/issues/19873">#19873</a></li>
<li><a class="issue tracker-1 status-1 priority-4 priority-default" title="Bug: Issue with ObjectSpace.each_objects not returning objects after starting a ractor (Open)" href="https://redmine.ruby-lang.org/issues/19387">#19387</a></li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: test_process.rb tests fail sometimes on FreeBSD (Closed)" href="https://redmine.ruby-lang.org/issues/19680">#19680</a></li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TestProcess#test_wait_and_sigchild が、たまに失敗する (Closed)" href="https://redmine.ruby-lang.org/issues/4173">#4173</a></li>
</ul>
<p>Here is a list of open pull requests submitted by KJ to fix bugs:</p>
<ul>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: GC.verify_compaction_references does not actually move all objects (Closed)" href="https://redmine.ruby-lang.org/issues/20022">#20022</a> <a href="https://github.com/ruby/ruby/pull/9041" class="external">https://github.com/ruby/ruby/pull/9041</a>
</li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: rb_register_postponed_job async-signal-unsafety causes crash in GC (Closed)" href="https://redmine.ruby-lang.org/issues/19991">#19991</a> <a href="https://github.com/ruby/ruby/pull/8949" class="external">https://github.com/ruby/ruby/pull/8949</a> and <a href="https://github.com/ruby/ruby/pull/8856" class="external">https://github.com/ruby/ruby/pull/8856</a>
</li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Make Ruby work properly with ASAN enabled (Closed)" href="https://redmine.ruby-lang.org/issues/20001">#20001</a> <a href="https://github.com/ruby/ruby/pull/8903" class="external">https://github.com/ruby/ruby/pull/8903</a>
</li>
<li><a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: `ConditionVariable#signal` is not fair when the wakeup is consistently spurious. (Open)" href="https://redmine.ruby-lang.org/issues/19717">#19717</a> <a href="https://github.com/ruby/ruby/pull/8331" class="external">https://github.com/ruby/ruby/pull/8331</a>
</li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Ruby should set AI_V4MAPPED | AI_ADDRCONFIG getaddrinfo flags by default (Closed)" href="https://redmine.ruby-lang.org/issues/19144">#19144</a> <a href="https://github.com/ruby/ruby/pull/7295" class="external">https://github.com/ruby/ruby/pull/7295</a>
</li>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Verbose GC debug output with -DRGENGC_DEBUG=5 causes a crash (Closed)" href="https://redmine.ruby-lang.org/issues/18795">#18795</a> <a href="https://github.com/ruby/ruby/pull/5992" class="external">https://github.com/ruby/ruby/pull/5992</a>
</li>
</ul>
<p>In addition to these Redmine issues, KJ has also fixed other bugs:</p>
<ul>
<li><a href="https://github.com/ruby/ruby/commit/9a62fd3cbae2ebb60e2f9cad782af1ad18db4319" class="external">https://github.com/ruby/ruby/commit/9a62fd3cbae2ebb60e2f9cad782af1ad18db4319</a></li>
<li><a href="https://github.com/ruby/ruby/commit/76dc327eeffefe02577999fe5f8215f762a581b6" class="external">https://github.com/ruby/ruby/commit/76dc327eeffefe02577999fe5f8215f762a581b6</a></li>
<li><a href="https://github.com/ruby/ruby/commit/082962e857833dfc16881cb4dfb44caa175590ba" class="external">https://github.com/ruby/ruby/commit/082962e857833dfc16881cb4dfb44caa175590ba</a></li>
<li><a href="https://github.com/ruby/ruby/commit/edee9b6a12ac846d7b3de2d704e170bf28178cb3" class="external">https://github.com/ruby/ruby/commit/edee9b6a12ac846d7b3de2d704e170bf28178cb3</a></li>
<li><a href="https://github.com/ruby/ruby/commit/dd406c5a911d2f4a16ce97016666760713540185" class="external">https://github.com/ruby/ruby/commit/dd406c5a911d2f4a16ce97016666760713540185</a></li>
<li><a href="https://github.com/ruby/ruby/commit/7bd7aee02e303de27d2cddfc5ef47e612d6782cb" class="external">https://github.com/ruby/ruby/commit/7bd7aee02e303de27d2cddfc5ef47e612d6782cb</a></li>
<li><a href="https://github.com/ruby/ruby/commit/05ffc037ad15560cb2c683682c5bc374156571d7" class="external">https://github.com/ruby/ruby/commit/05ffc037ad15560cb2c683682c5bc374156571d7</a></li>
<li><a href="https://github.com/ruby/ruby/pull/7867" class="external">https://github.com/ruby/ruby/pull/7867</a></li>
<li><a href="https://github.com/ruby/ruby/pull/7865" class="external">https://github.com/ruby/ruby/pull/7865</a></li>
<li><a href="https://github.com/ruby/zlib/commit/3b9fe962d8" class="external">https://github.com/ruby/zlib/commit/3b9fe962d8</a></li>
<li><a href="https://github.com/ruby/zlib/commit/c96e8b9a57" class="external">https://github.com/ruby/zlib/commit/c96e8b9a57</a></li>
</ul>
<p>In addition to bug fixing, KJ has also proposed and implemented a useful Socket feature:</p>
<ul>
<li><a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Support parsing SCM_CRED(ENTIALS) messages from ancillary messages (Open)" href="https://redmine.ruby-lang.org/issues/19179">#19179</a> <a href="https://github.com/ruby/ruby/pull/6822" class="external">https://github.com/ruby/ruby/pull/6822</a>
</li>
</ul> Ruby master - Misc #20028 (Closed): I'd like my commit bit backhttps://redmine.ruby-lang.org/issues/200282023-11-30T06:55:24Zzenspider (Ryan Davis)
<p>It's been a while, in the svn -> git shuffle I lost commit privs. I'd like to help out more actively, triage issues, clean doco, etc.</p>
<p>Not sure who's doing admin work so I'm not sure who to assign to to expedite.</p> Ruby master - Misc #20015 (Closed): Privacy policy for ruby-lang.orghttps://redmine.ruby-lang.org/issues/200152023-11-22T05:31:47Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>We got the request to add privacy policy page on ruby-lang.org at <a href="https://github.com/ruby/www.ruby-lang.org/issues/3134" class="external">https://github.com/ruby/www.ruby-lang.org/issues/3134</a></p>
<p>I put a draft page: <a href="https://github.com/ruby/www.ruby-lang.org/pull/3144" class="external">https://github.com/ruby/www.ruby-lang.org/pull/3144</a></p>
<p>We will discuss about this in dev meeting with Matz before deploy that.</p> Ruby master - Feature #19972 (Assigned): Install default/bundled gems into dedicated directorieshttps://redmine.ruby-lang.org/issues/199722023-10-25T15:30:22Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>I think that the current situation, where the same directory (lets call it <code>Gem.default_dir</code>) is used for default/bundled gems as well as for user installed gems, is suboptimal. During the times, this has caused us quite some issue on Fedora. Historically, we redefined the <code>Gem.default_dir</code> to user home directory, to avoid the mixing of system gems and user installed gems. Unfortunately, with advent of default/bundled gems, we were facing issues that these gems were suddenly not listed, etc. I am realizing this issue in full once again since the "user install" RubyGems feature has landed <a href="https://github.com/rubygems/rubygems/pull/5327" class="external">1</a>. I also think that we have arrived to this situation by evolution, not by design.</p>
<p>Therefore my proposal is:</p>
<p>Keep the <code>Gem.default_dir</code> for user <code>gem install</code>ed gems and lets install default and bundled gems into separate dedicated directories. Have separate <code>Gem.bundled_gems_dir</code> and <code>Gem.default_gems_dir</code> structures.</p>
<p>Of course, if <code>Gem.default_dir == Gem.bundled_gems_dir == Gem.default_gems_dir</code>, we still can have the current layout.</p>
<p>I have a simple POC here:</p>
<p><a href="https://github.com/ruby/ruby/pull/8761" class="external">https://github.com/ruby/ruby/pull/8761</a></p>
<p>BTW I have reported it here, because I think that RubyGems provides all it is needed. So it is not RubyGems ticket after all. However, I believe that RubyGems could benefit from this long term and some simplifications/cleanups would be possible.</p> Ruby master - Bug #19929 (Closed): Warnings for `mutex_m`, `drb` and `base64` appears while the g...https://redmine.ruby-lang.org/issues/199292023-10-17T12:58:30Zyahonda (Yasuo Honda)yasuo.honda@gmail.com
<p>Running some of Ruby on Rails unit test raises these warnings while it has explicit add_dependency entries <a href="https://github.com/rails/rails/blob/ae6fa7a048d0a0f79b0f8dd8566c7d499fd6f616/activesupport/activesupport.gemspec#L42-L45" class="external">https://github.com/rails/rails/blob/ae6fa7a048d0a0f79b0f8dd8566c7d499fd6f616/activesupport/activesupport.gemspec#L42-L45</a></p>
<pre><code>warning: mutex_m which will be not part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile.
warning: drb which will be not part of the default gems since Ruby 3.4.0. Add drb to your Gemfile.
warning: base64 which will be not part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile.
</code></pre>
<a name="Steps-to-reproduce"></a>
<h3 >Steps to reproduce<a href="#Steps-to-reproduce" class="wiki-anchor">¶</a></h3>
<pre><code>git clone https://github.com/rails/rails
cd rails
rm Gemfile.lock
bundle install
cd railties
RAILS_STRICT_WARNING=1 bin/test test/engine/commands_test.rb test/engine/test_test.rb
</code></pre>
<a name="Expected-behavior"></a>
<h3 >Expected behavior<a href="#Expected-behavior" class="wiki-anchor">¶</a></h3>
<p>It should finish successfully.</p>
<a name="Actual-behavior"></a>
<h3 >Actual behavior<a href="#Actual-behavior" class="wiki-anchor">¶</a></h3>
<p>It raises these warnings. Rails has the <code>RAILS_STRICT_WARNING</code> environment variable to fail if any warnings.</p>
<pre><code>warning: mutex_m which will be not part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile.
warning: drb which will be not part of the default gems since Ruby 3.4.0. Add drb to your Gemfile.
warning: base64 which will be not part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile.
</code></pre>
<pre><code>$ ruby -v
ruby 3.3.0dev (2023-10-17T11:07:57Z :detached: 2a8ac8ead5) [x86_64-linux]
$ RAILS_STRICT_WARNING=1 bin/test test/engine/commands_test.rb test/engine/test_test.rb
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/notifications/fanout.rb:3: warning: mutex_m which will be not part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile.
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/parallelization.rb:3: warning: drb which will be not part of the default gems since Ruby 3.4.0. Add drb to your Gemfile.
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/message_encryptor.rb:4: warning: base64 which will be not part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile.
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/strict_warnings.rb:33:in `warn': /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/message_encryptor.rb:4: warning: base64 which will be not part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile. (RuntimeError)
from <internal:warning>:51:in `warn'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:248:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/message_encryptor.rb:4:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/encrypted_file.rb:5:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/encrypted_configuration.rb:4:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/application.rb:9:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/railties/lib/rails.rb:15:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/all.rb:5:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/railties/test/abstract_unit.rb:15:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/railties/test/engine/commands_test.rb:3:in `<top (required)>'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `require'
from /home/yahonda/.rbenv/versions/trunk/lib/ruby/3.3.0+0/bundler/rubygems_integration.rb:250:in `block (2 levels) in replace_require'
from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:51:in `block in load_tests'
from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:51:in `each'
from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:51:in `load_tests'
from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:43:in `run'
from /home/yahonda/src/github.com/rails/rails/tools/test.rb:18:in `<top (required)>'
from bin/test:5:in `require_relative'
from bin/test:5:in `<main>'
$ ruby -v
ruby 3.3.0dev (2023-10-17T11:07:57Z :detached: 2a8ac8ead5) [x86_64-linux]
$ gem -v
3.5.0.dev
$ bundle -v
Bundler version 2.5.0.dev
$
</code></pre> Ruby master - Bug #19886 (Closed): "default->bundled gem" warning is not shown under "bundle exec"https://redmine.ruby-lang.org/issues/198862023-09-16T06:20:01Zmame (Yusuke Endoh)mame@ruby-lang.org
<pre><code>$ cat Gemfile
source "https://rubygems.org"
$ cat test.rb
require "base64"
$ bundle exec ruby test.rb
$
</code></pre>
<p>In this situation, <code>bundle exec ruby test.rb</code> should print a warning: base64 which will be not part of the default gems since Ruby 3.4.0.</p>
<p>Note that <code>ruby test.rb</code> shows the warning, which is not needed (see <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Invalid Warning for Default Gems That Will Move to Bundled Gems (Closed)" href="https://redmine.ruby-lang.org/issues/19885">#19885</a>).</p>
<pre><code>$ ruby test.rb
test.rb:1: warning: base64 which will be not part of the default gems since Ruby 3.4.0
</code></pre> Ruby master - Bug #19885 (Closed): Invalid Warning for Default Gems That Will Move to Bundled Gemshttps://redmine.ruby-lang.org/issues/198852023-09-15T22:26:57Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<p>Starting in ruby 3.3.0-preview2, attempting to require bigdecimal, mutex_m, base64, or other libraries that will move to bundled gems in Ruby 3.4.0 results in a warning, even when bundler is not in use:</p>
<pre><code>$ ruby33 -v -r bigdecimal -e ''
ruby 3.3.0preview2 (2023-09-14 master e50fcca9a7) [x86_64-openbsd]
warning: bigdecimal which will be not part of the default gems since Ruby 3.4.0
</code></pre>
<p>I think such warnings are bugs if bundler is not in use. When a library is moved from a default gem to a bundled gem, such code will work fine if not using bundler. It is only when using bundler where such code would have problems, and therefore, if Ruby warns at all, it should only warn when bundler is in use.</p>
<p>The only time such a warning would make sense if bundler is not in use is if the library was not going to be a bundled gem. In that case, first the library should be moved from a default gem to a bundled gem, then the bundled gem that ships with Ruby should provide the warning, which you can avoid by installing an updated gem version.</p>
<p>Note that you also get the warning when loading a gem that has bigdecimal as a runtime dependency (this example uses Sequel 5.72.0, which has a runtime dependency on bigdecimal as you can see at <a href="https://rubygems.org/gems/sequel/versions/5.72.0" class="external">https://rubygems.org/gems/sequel/versions/5.72.0</a>):</p>
<pre><code>$ ruby33 -v -r sequel -e ''
ruby 3.3.0preview2 (2023-09-14 master e50fcca9a7) [x86_64-openbsd]
/usr/local/lib/ruby/gems/3.3/gems/sequel-5.72.0/lib/sequel/core.rb:3: warning: bigdecimal which will be not part of the default gems since Ruby 3.4.0
</code></pre>
<p>This warning makes even less sense, because even if bigdecimal was removed as both a default gem and a bundled gem, installing Sequel 5.72.0 would install bigdecimal as a dependency.</p> Ruby master - Bug #19866 (Rejected): Future of `readline.rb`https://redmine.ruby-lang.org/issues/198662023-09-06T15:20:37Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>I wonder what is the future of readline.rb? It still tries to load <code>readline.so</code> by default. Is this intended behavior? I'd say that instead, it should rather fire a deprecation warning and load reline. Or maybe the whole readline gem should be completely removed?</p> Ruby master - Feature #19846 (Closed): Extend warnings message of bundled gems for gem authorhttps://redmine.ruby-lang.org/issues/198462023-08-24T08:59:52Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>This is my task reminder. The current warnings feature of bundled gems only notice for Gemfile.</p>
<p>Like this:</p>
<pre><code>$ cat Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
gem "activesupport"
</code></pre>
<pre><code>$ bundle exec irb
>> require "active_support/all"
/Users/hsbt/.local/share/gem/gems/activesupport-7.0.7.2/lib/active_support/core_ext/big_decimal/conversions.rb:3: warning: bigdecimal will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile.
/Users/hsbt/.local/share/gem/gems/activesupport-7.0.7.2/lib/active_support/notifications/fanout.rb:3: warning: mutex_m will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile.
</code></pre>
<p>But we should also notice above message for maintainer of <code>activesupport</code> like "Add "mutex_m" with <code>add_dependency</code> to <code>activesupport</code> gemspec."</p> Ruby master - Feature #19776 (Closed): Warn bundled gems when it called from `require`https://redmine.ruby-lang.org/issues/197762023-07-19T09:02:32Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>We should warn when users try to load default gems that will be promoted bundled gems at next version. We will warn them only under the bundler environment without Gemfile.</p>
<ul>
<li>Ruby 3.3:
<ul>
<li>Warn for adding bundled gems to be addressed Ruby 3.4 to Gemfile when user load its gem without <code>gem 'foo'</code> in their Gemfile.
<ul>
<li>Target libraries are TBD</li>
</ul>
</li>
<li>Also warn existing bundled gems was loaded without <code>gem 'foo'</code> of Gemfile. Ex. net-smtp, rexml etc.</li>
</ul>
</li>
<li>Ruby 3.4:
<ul>
<li>Promote bundled gems.
<ul>
<li>Raise LoadError same as current behavior with warnings of Ruby 3.3.</li>
</ul>
</li>
<li>Warn same as Ruby 3.3.</li>
</ul>
</li>
</ul>
<p>I implemented PoC for this: <a href="https://github.com/ruby/ruby/pull/8096" class="external">https://github.com/ruby/ruby/pull/8096</a></p> Ruby master - Misc #19747 (Closed): Propose Kevin Newton and Jemma Issroff as core committershttps://redmine.ruby-lang.org/issues/197472023-06-28T03:59:32Zk0kubun (Takashi Kokubun)takashikkbn@gmail.com
<a name="Proposal"></a>
<h1 >Proposal<a href="#Proposal" class="wiki-anchor">¶</a></h1>
<p>I'd like to propose Kevin Newton (<a class="user active user-mention" href="https://redmine.ruby-lang.org/users/10206">@kddnewton (Kevin Newton)</a>) and Jemma Issroff (<a class="user active user-mention" href="https://redmine.ruby-lang.org/users/45106">@jemmai (Jemma Issroff)</a>) as core committers. Now that YARP [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Mirror YARP to Ruby (Closed)" href="https://redmine.ruby-lang.org/issues/19741">#19741</a>] is merged, I want them to work on YARP's CRuby integration without asking other committers to merge their patches.</p>
<a name="Background"></a>
<h1 >Background<a href="#Background" class="wiki-anchor">¶</a></h1>
<p>They have not only authored YARP but also contributed various other things to CRuby. I'll include their message for this proposal.</p>
<a name="Kevin-Newton"></a>
<h2 >Kevin Newton<a href="#Kevin-Newton" class="wiki-anchor">¶</a></h2>
<p>I have been working on <a href="https://github.com/ruby/ruby/commits?author=kddnewton" class="external">ruby/ruby</a> since early 2021. My main contributions so far have been:</p>
<ul>
<li>
<strong>YJIT:</strong> I helped design the IR and then implemented the backend for ARM64 support.</li>
<li>
<strong>Constants:</strong> I designed and built a new system for constant caches to improve copy-on-write performance and help invalidate less JIT-ed code.</li>
<li>
<strong>YARP:</strong> I designed and built YARP from the ground up, which was recently mirrored into CRuby.</li>
</ul>
<p>I want to continue to contribute to ruby/ruby to help maintain the work I've done so far and build more going forward. Being a committer would make it easier to maintain YARP and more easily respond to questions/concerns.</p>
<a name="Jemma-Issroff"></a>
<h2 >Jemma Issroff<a href="#Jemma-Issroff" class="wiki-anchor">¶</a></h2>
<p>I have been <a href="https://github.com/ruby/ruby/pulls?page=1&q=author%3Ajemmaissroff" class="external">an active contributor to ruby/ruby</a>. Here are a few highlights of my contributions so far:</p>
<ul>
<li>
<strong>Object Shapes:</strong> I implemented the object shapes technique which fundamentally changed how instance variable access worked, to simplify cache checks, increase cache hits, and decrease runtime checks on instance variables. <a href="https://www.youtube.com/watch?v=So-KvN3p-eE" class="external">I spoke about this work</a> at RubyKaigi 2022. <a href="https://bugs.ruby-lang.org/issues/18776" class="external">https://bugs.ruby-lang.org/issues/18776</a>
</li>
<li>
<strong>YARP:</strong> I made <a href="https://github.com/ruby/yarp/pulls?q=author%3Ajemmaissroff" class="external">significant contributions to YARP</a>, including writing the code to mirror it into ruby/ruby. <a href="https://bugs.ruby-lang.org/issues/18776" class="external">https://bugs.ruby-lang.org/issues/18776</a>
</li>
<li>
<strong>Documentation:</strong> I have worked on improving the documentation within ruby/ruby, and migrating the Wiki to make it easier to edit, avoid duplication, and stay up to date. <a href="https://www.youtube.com/watch?v=7y6DhXQU4wU" class="external">I spoke about contributing to CRuby</a> at RubyKaigi 2023. <a href="https://bugs.ruby-lang.org/issues/19679" class="external">https://bugs.ruby-lang.org/issues/19679</a>
</li>
</ul>
<p>I would like to continue to contribute to Ruby. Specifically, being a Ruby committer will reduce friction as I work to compile YARP's AST into ISeqs and fully integrate YARP into ruby/ruby.</p>
<a name="Onboarding"></a>
<h1 >Onboarding<a href="#Onboarding" class="wiki-anchor">¶</a></h1>
<p>Aaron and I have helped them work on the CRuby integration. We will continue to help them as they onboard as Ruby committers.</p> Ruby master - Feature #19702 (Closed): Promote racc as bundled gemshttps://redmine.ruby-lang.org/issues/197022023-05-31T09:04:23Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>In the past, we need to bundle <code>racc</code> runtime for RD parser of RDoc. Now, We have racc compiler and runtime in ruby repository.</p>
<p>I'm not sure we should bundle and maintain <code>racc</code> as stdlib(= default gems) in the future. Can we promote <code>racc</code> to bundled gems?</p> Ruby master - Bug #19576 (Closed): Backport request: Gemfile.lock resolving is broken with bundle...https://redmine.ruby-lang.org/issues/195762023-04-04T13:47:32Zjprokop (Jarek Prokop)
<p>This is a backport request for bundler, that regressed in 2.3.36 in a specific situation. Newer and older bundler versions that ship with Ruby are not problematic, only the version that ships with Ruby version >= 3.1.3.</p>
<p>A few weeks ago, we discovered a bug in resolving in bundler shipped with Ruby 3.1.3 and 3.1.4:<br>
Bundler version:</p>
<pre><code>$ bundler --version
Bundler version 2.3.26
</code></pre>
<p>Affected rubies <code>ruby -v</code>:<br>
First:</p>
<pre><code>$ ruby -v
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
</code></pre>
<p>Second:</p>
<pre><code>$ruby -v
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]
</code></pre>
<p>Initial bug report with reproducer and more in-depth description can be found here: <a href="https://github.com/sclorg/s2i-ruby-container/issues/469" class="external">https://github.com/sclorg/s2i-ruby-container/issues/469</a></p>
<p>Using the following Gemfile for a rails app:<br>
<a href="https://github.com/sclorg/rails-ex/blob/67b7a61eae9efa1088ff3f634ae316e1022fa913/Gemfile.lock" class="external">https://github.com/sclorg/rails-ex/blob/67b7a61eae9efa1088ff3f634ae316e1022fa913/Gemfile.lock</a><br>
bundler locks up in trying to resolve Nokogiri for Ruby 3.1, but keeps failing because it keeps using incompatible built binary gem instead of falling back to installing and building the binary extension of Nokogiri locally.</p>
<p>We craft this Gemfile to be usable from Ruby 2.5 up to Ruby 3.1, as the app is used mainly for testing.</p>
<p>I have created a patch to fix the situation, see the attached files. There are 2 of them, one contains the fix and the other one contains the test from the rubygems repo PR#6225.<br>
full commit available here: <a href="https://src.fedoraproject.org/fork/jackorp/rpms/ruby/c/5ef600a8f40b76de5636dc5e24b75e4e3ff1a87f" class="external">https://src.fedoraproject.org/fork/jackorp/rpms/ruby/c/5ef600a8f40b76de5636dc5e24b75e4e3ff1a87f</a></p>
<p>The patches are created from the following upstream changes in bundler:<br>
<a href="https://github.com/rubygems/rubygems/pull/6225" class="external">https://github.com/rubygems/rubygems/pull/6225</a><br>
and adapted:<br>
<a href="https://github.com/rubygems/rubygems/commit/7b64c64262a7a980c0eb23b96ea56cf72ea06e89" class="external">https://github.com/rubygems/rubygems/commit/7b64c64262a7a980c0eb23b96ea56cf72ea06e89</a><br>
for the PR#6225.</p>
<p>With the fix applied I no longer have issues doing <code>bundle install</code> with our Gemfile.lock.</p> Ruby master - Bug #19568 (Third Party's Issue): Windows mingw rust, failures with test/rubygems/t...https://redmine.ruby-lang.org/issues/195682023-04-02T17:15:01ZMSP-Greg (Greg L)
<p>The Windows ucrt & mingw builds recently started failing tests in:</p>
<p>test/rubygems/test_gem_ext_cargo_builder.rb TestGemExtCargoBuilder</p>
<p>Checking changed files from the last good build showed:<br>
array.c<br>
gems/bundled_gems<br>
iseq.c<br>
lib/irb.rb<br>
lib/irb/cmd/nop.rb<br>
lib/irb/completion.rb<br>
lib/irb/ext/tracer.rb<br>
lib/irb/extend-command.rb<br>
lib/ruby_vm/rjit/compiler.rb<br>
lib/ruby_vm/rjit/context.rb<br>
lib/ruby_vm/rjit/insn_compiler.rb<br>
lib/ruby_vm/rjit/jit_state.rb<br>
rjit_c.c<br>
rjit_c.h<br>
rjit_c.rb<br>
test/irb/test_cmd.rb<br>
tool/leaked-globals<br>
tool/rjit/bindgen.rb<br>
vm_callinfo.h<br>
yjit.c<br>
yjit/bindgen/src/main.rs<br>
yjit/src/codegen.rs<br>
yjit/src/cruby_bindings.inc.rs</p>
<p>There have been no changes to ruby-loco during this time. ruby-loco uses rust installed by dtolnay/rust-toolchain@stable, which are the tools provided by<br>
the Rust organization. I also tried MSYS2 rust.</p>
<p>I've created two files showing the errors logs:<br>
<a href="https://github.com/MSP-Greg/ruby-loco/releases/download/error_logs/windows_ucrt_rust.txt" class="external">https://github.com/MSP-Greg/ruby-loco/releases/download/error_logs/windows_ucrt_rust.txt</a><br>
<a href="https://github.com/MSP-Greg/ruby-loco/releases/download/error_logs/windows_ucrt_msys2.txt" class="external">https://github.com/MSP-Greg/ruby-loco/releases/download/error_logs/windows_ucrt_msys2.txt</a></p>
<p>I'm not familiar with Rust, so I have no idea what the issue is. I'm guessing this might be an MSYS2 issue, but I'm not sure...</p> Ruby master - Bug #19485 (Closed): Unexpected behavior in squiggly heredocshttps://redmine.ruby-lang.org/issues/194852023-03-08T15:24:57Zjemmai (Jemma Issroff)
<p>Based on <a href="https://ruby-doc.org/3.2.1/syntax/literals_rdoc.html" class="external">the squiggly heredoc documentation</a>, I found the following to be unexpected behavior. Explicitly, the documentation specifies, "The indentation of the least-indented line will be removed from each line of the content."</p>
<p>After running:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">File</span><span class="p">.</span><span class="nf">write</span><span class="p">(</span><span class="s2">"test.rb"</span><span class="p">,</span> <span class="s2">"p <<~EOF</span><span class="se">\n\t</span><span class="s2">a</span><span class="se">\n</span><span class="s2"> b</span><span class="se">\n</span><span class="s2">EOF</span><span class="se">\n</span><span class="s2">"</span><span class="p">)</span>
</code></pre>
<p>and then <code>ruby test.rb</code>, I get the following output:</p>
<pre><code>"\ta\nb\n"
</code></pre>
<p>The least-indented line above is <code> b</code>, however, no leading whitespace is removed from the line containing <code>\ta</code>.</p>
<p>For another example:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">File</span><span class="p">.</span><span class="nf">write</span><span class="p">(</span><span class="s2">"test.rb"</span><span class="p">,</span> <span class="s2">"p <<~EOF</span><span class="se">\n\t</span><span class="s2">A</span><span class="se">\n</span><span class="s2"> </span><span class="se">\t</span><span class="s2">B</span><span class="se">\n</span><span class="s2">EOF</span><span class="se">\n</span><span class="s2">"</span><span class="p">)</span>
</code></pre>
<p><code>ruby test.rb</code> gives:</p>
<pre><code>"A\nB\n"
</code></pre>
<p>In this case, the <code>\t</code> was removed from the line containing <code>A</code>, but more whitespace than that (<code> \t</code>) was removed from the line containing <code>B</code>.</p>
<p>After seeing the first example, I assumed that the documentation was out of date, and that I should fix it to read that <code>\t</code> would never be converted into space characters in order to remove leading whitespace. But after the second example, it seems like this is a bug in removing leading whitespace.</p>
<p>Can someone please explain what the rules should be on squiggly heredocs? I can implement a fix to adhere to the rules, or can update the documentation, I am just unsure of what the rules should be because the above two examples reflect unexpected behavior in two distinct ways.</p> Ruby master - Misc #19475 (Closed): Propose Matthew Valentine-House (@eightbitraptor) as a core c...https://redmine.ruby-lang.org/issues/194752023-03-03T17:38:41Zk0kubun (Takashi Kokubun)takashikkbn@gmail.com
<p>I'd like to propose Matthew Valentine-House (<a class="user active user-mention" href="https://redmine.ruby-lang.org/users/31800">@eightbitraptor (Matthew Valentine-House)</a>) as a committer. He has been <a href="https://github.com/ruby/ruby/pulls?q=author%3Aeightbitraptor" class="external">an active contributor to Ruby</a> in the following areas:</p>
<ul>
<li>
<p><strong>Variable Width Allocation</strong> - He worked on the VWA (RVARGC) project to increase performance by improving the spatial locality of objects <a href="https://bugs.ruby-lang.org/issues/17816" class="external">https://bugs.ruby-lang.org/issues/17816</a></p>
</li>
<li>
<p><strong>Compaction movement refactor</strong> - He re-worked the GC's compaction algorithm to facilitate object movement between the size pools to ensure VWA uses memory efficiently: <a href="https://bugs.ruby-lang.org/issues/18619" class="external">https://bugs.ruby-lang.org/issues/18619</a> (He spoke about this at <a href="https://rubykaigi.org/2022/presentations/eightbitraptor.html#day2" class="external">Ruby Kaigi 2022 in 津</a>)</p>
</li>
<li>
<p><strong>LLDB refactor & Developer experience</strong> - He is also passionate about the developer experience of working on the Ruby codebase. He has been refactoring the LLDB helpers to give them some more structure and make debugging Ruby easier: <a href="https://github.com/ruby/ruby/pull/6129" class="external">https://github.com/ruby/ruby/pull/6129</a></p>
</li>
</ul>
<p>He's really passionate about making Ruby's GC better. He wants to implement novel GC algorithms and techniques in CRuby, and I want to make it easier for him to push changes required for it. In particular, he's been working on integrating the <a href="https://www.mmtk.io/" class="external">MMTk project</a> into Ruby (They're producing nightly builds <a href="https://github.com/shopify/ruby-mmtk-builder" class="external">here</a>).</p>
<p>This is a proposal from <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/73">@tenderlovemaking (Aaron Patterson)</a> and myself. If accepted, we'll help him onboard as a Ruby committer. I already heard that <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/13">@matz (Yukihiro Matsumoto)</a> and <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/18">@mame (Yusuke Endoh)</a> are in favor of the idea, but let me formally propose this here.</p> Ruby master - Feature #19422 (Assigned): Make `--enabled-shared` mandatory on macOShttps://redmine.ruby-lang.org/issues/194222023-02-07T08:14:26Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<p>From the troubles around linker on macOS, I propose <code>--enable-shared</code> option mandatory on macOS.<br>
This patch enables the option by default, and abort if <code>--disable-shared</code> option is given explicitly.</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gh">diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
</span><span class="gd">--- i/configure.ac
</span><span class="gi">+++ w/configure.ac
</span><span class="p">@@ -504,6 +504,11 @@</span> AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
<span class="gi">+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
</span> [hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
<span class="p">@@ -3055,14 +3060,7 @@</span> AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
<span class="gd">- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
</span><span class="gi">+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
</span> rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
<span class="p">@@ -3356,10 +3354,6 @@</span> AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
<span class="gd">- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
</span> RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
</code></pre> Ruby master - Bug #19371 (Third Party's Issue): Having Psych 5 installed raises an error during a...https://redmine.ruby-lang.org/issues/193712023-01-23T11:15:03Ztombruijn (Tom de Bruijn)tom@tomdebruijn.com
<a name="Summary"></a>
<h2 >Summary<a href="#Summary" class="wiki-anchor">¶</a></h2>
<p>There's an issue on Ruby versions with Psych 4 installed by default (Ruby 2.6 through 3.1) after installing the Psych gem version 5. This problem occurs when a Ruby gem has a C-extension installation script that parses a YAML string.</p>
<p>I'm reporting it here and not with on the Psych gem repo, because it looks more like an issue with which Ruby C-extension is load during other gem's C-extension installation.</p>
<a name="Background"></a>
<h2 >Background<a href="#Background" class="wiki-anchor">¶</a></h2>
<p>I have a gem that parses a YAML string in the C-extension installation script, or it calls <code>Gem.configuration[:http_proxy]</code>, which parses the <code>.gemrc</code> file as YAML. This triggers the error mentioned below.</p>
<p>This YAML parsing is done in the gem's <code>ext/extconf.rb</code> file. An example gem can be found in this repository: <a href="https://github.com/tombruijn/yaml-dummy-gem" class="external">https://github.com/tombruijn/yaml-dummy-gem</a>, see the <a href="https://github.com/tombruijn/yaml-dummy-gem/blob/main/ext/extconf.rb#L3" class="external"><code>ext/extconf.rb</code> file</a>.</p>
<a name="The-problem"></a>
<h2 >The problem<a href="#The-problem" class="wiki-anchor">¶</a></h2>
<p>On Ruby 3.1.3 Psych version 4 is installed by default. When it parses the YAML file, it will use Psych 4.</p>
<p>When Psych 5 is also installed on Ruby 3.1.3, it is no longer be able to parse the YAML file. The following error is raised:</p>
<pre><code>$ bundle install
Fetching https://github.com/tombruijn/yaml-dummy-gem.git
Resolving dependencies...
Using bundler 2.3.7
Using yaml-dummy-gem 1.0.0 from https://github.com/tombruijn/yaml-dummy-gem.git (at main@a48852d)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/bundler/gems/yaml-dummy-gem-a48852dac33d/ext
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.1.0 -r ./siteconf20230123-730-rmbnnl.rb extconf.rb
/usr/local/lib/ruby/3.1.0/psych.rb:459:in `parse_stream': undefined method `parse' for #<Psych::Parser:0x0000ffff8078c7f8
@handler=#<Psych::Handlers::DocumentStream:0x0000ffff8078c910 @stack=[], @last=nil, @root=nil, @start_line=nil, @start_column=nil, @end_line=nil, @end_column=nil,
@block=#<Proc:0x0000ffff8078c848 /usr/local/lib/ruby/3.1.0/psych.rb:399>>, @external_encoding=0> (NoMethodError)
parser.parse yaml, filename
^^^^^^
from /usr/local/lib/ruby/3.1.0/psych.rb:399:in `parse'
from extconf.rb:3:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/bundle/bundler/gems/yaml-dummy-gem-a48852dac33d for inspection.
Results logged to /usr/local/bundle/bundler/gems/extensions/aarch64-linux/3.1.0/yaml-dummy-gem-a48852dac33d/gem_make.out
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
/usr/local/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build'
/usr/local/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/usr/local/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension'
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in build_extensions'
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions'
/usr/local/lib/ruby/3.1.0/rubygems/installer.rb:853:in `build_extensions'
/usr/local/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
/usr/local/lib/ruby/3.1.0/bundler/source/path/installer.rb:34:in `post_install'
/usr/local/lib/ruby/3.1.0/bundler/source/path.rb:244:in `generate_bin'
/usr/local/lib/ruby/3.1.0/bundler/source/git.rb:194:in `install'
/usr/local/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:54:in `install'
/usr/local/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/usr/local/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:186:in `do_install'
/usr/local/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
/usr/local/lib/ruby/3.1.0/bundler/worker.rb:62:in `apply_func'
/usr/local/lib/ruby/3.1.0/bundler/worker.rb:57:in `block in process_queue'
/usr/local/lib/ruby/3.1.0/bundler/worker.rb:54:in `loop'
/usr/local/lib/ruby/3.1.0/bundler/worker.rb:54:in `process_queue'
/usr/local/lib/ruby/3.1.0/bundler/worker.rb:91:in `block (2 levels) in create_threads'
An error occurred while installing yaml-dummy-gem (1.0.0), and Bundler cannot continue.
In Gemfile:
yaml-dummy-gem
</code></pre>
<a name="Debugging-results"></a>
<h2 >Debugging results<a href="#Debugging-results" class="wiki-anchor">¶</a></h2>
<p>The error is raised because the <code>Psych::Parser#parse</code> method cannot be found. In Psych version 4, this method is <a href="https://github.com/ruby/psych/blob/2c3708e0a483c6d44ebddaff0b524166f3e7bc78/ext/psych/psych_parser.c#L561" class="external">defined by the Psych C-extension</a>.</p>
<p>In Psych version 5 the <code>parse</code> method is <a href="https://github.com/ruby/psych/blob/1f23e6e7f0ab4a6efab598c1ee528bb52d40ee51/lib/psych/parser.rb#L61-L63" class="external">defined in the gem's Ruby code</a>. This method calls a <a href="https://github.com/ruby/psych/blob/1f23e6e7f0ab4a6efab598c1ee528bb52d40ee51/ext/psych/psych_parser.c#L547" class="external">C function registered as the private <code>_native_parse</code> method</a>, which is the renamed version of the <code>parse</code> C-function in Psych version 4.</p>
<p>From what I can tell, the Psych version 4 C-extension is no longer loaded when Psych version 5 is installed in this scenario. There is a mix up in which Psych gem version's C-extension is loaded during my dummy gem's C-extension installation. It load the Psych 4 Ruby code, with the Psych 5 C-extension∂.</p>
<p>I confirmed this by modifying the standard installed Psych gem's code on Ruby 3.1 (Docker image <code>ruby:3.1</code>), with the following the change, which prints <code>true</code> on error. This means the Psych 4 gem has the Psych 5 C-extension loaded where <code>_native_parse</code> is defined.</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gh">diff --git lib/psych.rb lib/psych.rb
index 42d79ef..1a690d2 100644
</span><span class="gd">--- lib/psych.rb
</span><span class="gi">+++ lib/psych.rb
</span><span class="p">@@ -452,6 +452,9 @@</span> def self.parser
def self.parse_stream yaml, filename: nil, &block
if block_given?
parser = Psych::Parser.new(Handlers::DocumentStream.new(&block))
<span class="gi">+ # This returns `true`, but it should be `false`. The `_native_parse`
+ # method is defined in the Psych 5 C-extension, not Psych 4.
+ puts parser.respond_to? :_native_parse, true # => true
</span> parser.parse yaml, filename
</code></pre>
<p>This error only occurs during the gem's extension installation in <code>ext/extconf.rb</code>. If the gem parses YAML when a Ruby app is running, it will not produce the same error with Psych version 5 installed.</p>
<p>This issue does not occur on Ruby 3.2, where Psych version 5 is installed by default.</p>
<p>I have confirmed this error occurs on the latest patch releases of the following Ruby versions: 3.1, 3.0, 2.7 and 2.6.</p>
<pre><code>$ gem list psych
psych (5.0.2, default: 4.0.3)
</code></pre>
<a name="Code-to-reproduce"></a>
<h2 >Code to reproduce<a href="#Code-to-reproduce" class="wiki-anchor">¶</a></h2>
<p>Here is a basic Ruby gem that only parses a YAML file during extension installation: <a href="https://github.com/tombruijn/yaml-dummy-gem" class="external">https://github.com/tombruijn/yaml-dummy-gem</a></p>
<p>Here is a small project that triggers the error: <a href="https://github.com/tombruijn/yaml-dummy-ruby-app" class="external">https://github.com/tombruijn/yaml-dummy-ruby-app</a></p>
<p>A GitHub actions workflow shows the results for all affected Ruby versions: <a href="https://github.com/tombruijn/yaml-dummy-ruby-app/actions/runs/3969088933" class="external">https://github.com/tombruijn/yaml-dummy-ruby-app/actions/runs/3969088933</a></p>
<p>The <a href="https://github.com/tombruijn/yaml-dummy-ruby-app" class="external">example app repo</a> also has instructions to run the example app locally. Please follow the instructions in the README to see the error.</p> Ruby master - Feature #19351 (Closed): Promote bundled gems at Ruby 3.3https://redmine.ruby-lang.org/issues/193512023-01-18T08:48:45Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>In Ruby 3.2, the default gems and bundled gems are changed only adding <code>syntax_suggest</code>. I and some committers are considering promote default gems to bundled gems again for Ruby 3.3+.</p>
<p>We hope to keep the current developer experience with dependency resolution and ignore the additional work like "Put gem "xxx" into your Gemfile" for developers.</p>
<a name="Proposal-for-Ruby-330-preview2"></a>
<h3 >Proposal for Ruby 3.3.0-preview2<a href="#Proposal-for-Ruby-330-preview2" class="wiki-anchor">¶</a></h3>
<p>I propose the following libraries will promote default gems to bundled gems at Ruby 3.3.0-preview2</p>
<pre><code>abbrev
getoptlong
observable
resolv-replace
rinda
nkf (C-ext)
syslog (C-ext)
base64
drb
mutex_m
csv
</code></pre>
<p>Other default gems depends on <code>make test-all</code> or other standard libraries. It's hard to promote in this time. And I submit a PoC of bypass feature for Bundler and bundled gems: <a href="https://github.com/rubygems/rubygems/pull/6811" class="external">https://github.com/rubygems/rubygems/pull/6811</a></p>
<p>This feature add <code>load_paths</code> defined by <code>Gem.bundled_gems</code> that is pair list of Gem name and version under the Bundler environment. This mean user can <code>require</code> bundled gems like <code>csv</code> without <code>gem "csv"</code> on Gemfile.</p>
<p>And we need to warn like "'csv' is loaded without Gemfile, add "gem 'csv'" in your Gemfile" in <code>require</code> or other place. I have no idea how notice this yet.</p>
<hr>
<a name="Proposal"></a>
<h3 >Proposal<a href="#Proposal" class="wiki-anchor">¶</a></h3>
<p>I propose the following libraries will promote default gems to bundled gems at Ruby 3.3. They are not the dependencies of Rails and RubyGems/Bundler.</p>
<pre><code>abbrev
getoptlong
observable
resolv-replace
rinda
nkf (C-ext)
syslog (C-ext)
</code></pre>
<p>Update: I removed <code>optparse</code> and <code>un</code> from above list. Because they are used by Ruby build process.</p>
<pre><code>optparse
un
</code></pre>
<p>Update 2: I also removed the following libraries. <code>resolv</code> and <code>fcntl</code> are used by test of Ruby internal like <code>test_io.rb</code>. And we don't have built process of C extension at Windows platform. I gave up to extract <code>win32ole</code> in this time.</p>
<pre><code>resolv
fcntl (C-ext)
win32ole (C-ext)
</code></pre>
<a name="Additional-works"></a>
<h3 >Additional works<a href="#Additional-works" class="wiki-anchor">¶</a></h3>
<p>I also propose to promote rails dependencies without rubygems/bundler deps:</p>
<pre><code>base64
drb
mutex_m
</code></pre>
<p>Update: <code>delegate</code> is used by <code>tempfile</code>. We need to keep <code>delegate</code> as default gems for build process. and I added <code>reline</code> into above list.</p>
<p>Update 2: The following libraries used by tests of <code>ruby/ruby</code> and other libraries like psych. I need to remove their dependency from <code>ruby/ruby</code>.</p>
<pre><code>benchmark
forwardable
ipaddr
irb
reline
ostruct
rdoc
singleton
tsort
weakref
bigdecimal (C-ext)
date(datetime) (C-ext)
</code></pre>
<p>And gems maintained by <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/32">@kou (Kouhei Sutou)</a></p>
<pre><code>csv
</code></pre>
<p>Following gems also maintained by <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/32">@kou (Kouhei Sutou)</a>, but they are used on RubyGems/Bundler or MJIT. Maybe, We couldn't promote them because RubyGems/Bundler couldn't bundle C-ext gems.</p>
<pre><code>fiddle (C-ext): used by MJIT
stringio (C-ext) used by RubyGems/Bundler
strscan (C-ext) used by RubyGems/Bundler
</code></pre>
<a name="Follow-up-feature"></a>
<h3 >Follow-up feature<a href="#Follow-up-feature" class="wiki-anchor">¶</a></h3>
<p>But if we promote them to bundled gems, many of users need to add like <code>gem "csv"</code> into their Gemfile. I'm considering avoiding this situation.</p>
<p>Can we introduce the specific feature of bundled gems to RubyGems or Bundler? Example, bundler have allowed list for bundled gems. So, listed gems could be require without Gemfile under the bundle exec.</p> Ruby master - Bug #19340 (Closed): Ruby master 'make install' not installing rbs gemhttps://redmine.ruby-lang.org/issues/193402023-01-14T21:22:32ZMSP-Greg (Greg L)
<p>Last three daily builds of ruby-dev-builder have not included the rbs gem.</p>
<p>See <a href="https://github.com/ruby/ruby-dev-builder/actions/runs/3919887598/jobs/6701177359#step:17:284" class="external">https://github.com/ruby/ruby-dev-builder/actions/runs/3919887598/jobs/6701177359#step:17:284</a></p>
<p>ruby/ruby PR <a href="https://github.com/ruby/ruby/pull/7114" class="external">https://github.com/ruby/ruby/pull/7114</a></p>
<p>ruby/ruby-dev-builder PR <a href="https://github.com/ruby/ruby-dev-builder/pull/2" class="external">https://github.com/ruby/ruby-dev-builder/pull/2</a> checks all bin files work</p>
<p>Added a patch to ruby-loco for it, so its builds are ok.</p> Ruby master - Misc #19276 (Third Party's Issue): It is not possible to reply to emails from redminehttps://redmine.ruby-lang.org/issues/192762022-12-28T16:41:32Zgraywolf (Gray Wolf)
<p>It is no possible to reply to email from about issue update in order to add further comments to the tickets. Is that something that could be turned on? I think it would be user friendly to be able to react directly from mail client, without having to switch to the browser and navigate to the issue and comment there.</p> Ruby master - Bug #19275 (Closed): Bundled gems extensions are not installed with 3.2.0 release t...https://redmine.ruby-lang.org/issues/192752022-12-28T13:02:07Zxtkoba (Tee KOBAYASHI)
<p>Bundled gems extensions are not installed with 3.2.0 release tarball when cross building for <code>aarch64-linux-android</code> target.</p>
<p>Possibly related to <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: irb ignores rbs and debug (Closed)" href="https://redmine.ruby-lang.org/issues/19271">#19271</a>.</p>
<p>Excerpt from build log:</p>
<pre><code>2022-12-28T12:39:39.5065133Z linking shared-object rbs_extension.so
2022-12-28T12:39:39.5317220Z Successfully remade target file '../../../../../.bundle/extensions/aarch64-linux-android/3.2.0/rbs-2.8.2/rbs_extension.so'.
[...]
2022-12-28T12:40:06.9333744Z rm -rf .bundle/extensions/aarch64-linux-android/
</code></pre>
<p>Seems like bundled gems extensions are built but removed afterwards.</p>
<p>The workaround we took is to patch <code>common.mk</code> so that <code>outdate-bundled-gems</code> is not triggered:</p>
<pre><code class="patch syntaxhl" data-language="patch"><span class="gd">--- a/common.mk
</span><span class="gi">+++ b/common.mk
</span><span class="p">@@ -1375,7 +1375,6 @@</span>
refresh-gems: update-bundled_gems prepare-gems
prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
<span class="gd">-prepare-gems: $(DOT_WAIT) $(HAVE_BASERUBY:yes=outdate-bundled-gems)
</span> extract-gems: $(HAVE_BASERUBY:yes=update-gems)
update-gems$(gnumake:yes=-sequential): PHONY
</code></pre>
<p>Full build log is attached.</p> Ruby master - Bug #19271 (Closed): irb ignores rbs and debughttps://redmine.ruby-lang.org/issues/192712022-12-27T16:01:48Zolivierlacan (Olivier Lacan)hi@olivierlacan.com
<p>Not sure this is a serious issue but when starting IRB this (potentially confusing) message is immediately printed:</p>
<pre><code>$ irb
Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.1
Ignoring rbs-2.8.2 because its extensions are not built. Try: gem pristine rbs --version 2.8.2
irb(main):001:0>
</code></pre>
<p>This is on a fresh installation of Ruby 3.2.0 with an empty Gemfile in the directory.</p>
<p>I haven't run gem pristine on any gem since I hadn't installed any gems after installing Ruby 3.2.0 here but FYI:</p>
<pre><code>$ gem list | grep "rbs\|debug"
debug (1.7.1)
rbs (2.8.2)
</code></pre>
<p>This seems to suggest that C extensions weren't built for those gems when they were installed during the Ruby installation process. Just to be safe I checked and while I do use rbenv and ruby-build to compile and manage Rubies, I don't have a default gem installer set up so as far as I know these gems weren't installed by my system.</p> Ruby master - Misc #19178 (Closed): How does CRuby handle CVE issues in stdlib gems which get pat...https://redmine.ruby-lang.org/issues/191782022-12-03T21:19:52ZSegaja (Andreas Schleifer)segaja@archlinux.org
<p>If there is a CVE issue in one of the stdlibs ( <a href="https://stdgems.org/" class="external">https://stdgems.org/</a> ) which gets patched, what is CRubys approach on how to push this critical fix to the users?</p>
<p>As far as I know stdlibs get only updated for the users if CRuby releases a new version. So will CRuby always release a new version if there is a critical fix an stdlib "needs" to be updated?</p> Ruby master - Misc #19162 (Closed): [ANN] Restrict weak ssh public key for git.ruby-lang.orghttps://redmine.ruby-lang.org/issues/191622022-12-01T02:13:37Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>We continuously migrate our ssh public keys on git.ruby-lang.org from svn and cvs.</p>
<p>I found some of pub keys used weak algorithm. So, I will restrict them at 15 Dec 2022.</p>
<p>I'll notify committers who are still use weak key later.</p> Ruby master - Bug #19158 (Closed): Ruby 3.1.3 installs wrong gemspec for debug gemhttps://redmine.ruby-lang.org/issues/191582022-11-29T12:57:15Zdeivid (David Rodríguez)
<p>A pristine installation of Ruby 3.1.3 shows an installed <code>debug-1.6.3.gemspec</code> file that claims that debug-1.6.3 has no dependencies. This is incorrect, and causes issues for Bundler as reported at <a href="https://github.com/rubygems/rubygems/issues/6082" class="external">https://github.com/rubygems/rubygems/issues/6082</a>.</p>
<p>An issue workaround is to manually reinstall the gem with <code>gem install debug:1.6.3</code>. That will reinstall the gem, including a correct gemspec file.</p>
<p>This is the file diff before and after reinstalling the gem</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gd">--- old.gemspec 2022-11-29 13:54:36
</span><span class="gi">+++ /Users/deivid/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/specifications/debug-1.6.3.gemspec 2022-11-29 13:55:25
</span><span class="p">@@ -24,4 +24,16 @@</span>
s.summary = "Debugging functionality for Ruby".freeze
s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version
<span class="gi">+
+ if s.respond_to? :specification_version then
+ s.specification_version = 4
+ end
+
+ if s.respond_to? :add_runtime_dependency then
+ s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])
+ s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])
+ else
+ s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])
+ s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])
+ end
</span> end
</code></pre>
<p>In general, the files installed by ruby-core for bundled gems should be identical to the ones installed by explicit <code>gem install</code>.</p>
<p>This issue is also present in master and I'm guessing it was introduced by <a href="https://github.com/ruby/ruby/commit/a2c66f52f402cb58372e271226f3341065561e53" class="external">https://github.com/ruby/ruby/commit/a2c66f52f402cb58372e271226f3341065561e53</a> (backported at <a href="https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74" class="external">https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74</a>).</p> Ruby master - Feature #19066 (Closed): Enable Scorecard Github Actionhttps://redmine.ruby-lang.org/issues/190662022-10-17T19:13:37Zjoycebrum (Joyce Brum)joycebrumu.u@gmail.com
<p>Hi, I am Joyce and I'm working on behalf of Google and the <a href="https://openssf.org/" class="external">Open Source Security Foundation</a> to help essential open-source projects improve their supply-chain security.</p>
<p>Would you consider adopting an OpenSSF tool called <a href="https://github.com/ossf/scorecard" class="external">Scorecards</a>? Scorecards runs dozens of automated security <a href="https://github.com/ossf/scorecard#scorecard-checks" class="external">checks</a> to help maintainers better understand their project's supply-chain security posture. It is developed by the OpenSSF, <a href="https://github.blog/2022-01-19-reducing-security-risk-oss-actions-opensff-scorecards-v4/" class="external">in partnership with GitHub</a>.</p>
<p>Considering how Ruby project is largely used, it is important to guarantee a good security posture for the project. The scorecard tool can help you on identifying what are the security practices that would improve the project's supply-chain security and what you have to do to accomplish them.</p>
<p>To simplify maintainers' lives, the OpenSSF has also developed the <a href="https://github.com/ossf/scorecard-action" class="external">Scorecard GitHub Action</a>. It is very lightweight and runs on every change to the repository's main branch. The results of its checks are available on the project's <a href="https://github.com/ruby/ruby/security" class="external">security dashboard</a>, and include suggestions on how to solve any issues (some examples are attached). The Action does not run or interact with any workflows, but merely parses them to identify possible vulnerabilities. This Action has been adopted by 1800+ projects already, having some prominent users like <a href="https://github.com/tensorflow/tensorflow" class="external">Tensorflow</a>, <a href="https://github.com/angular/angular" class="external">Angular</a>, <a href="https://github.com/flutter/flutter" class="external">Flutter</a>, <a href="https://sos.dev/" class="external">sos.dev</a> and <a href="https://deps.dev/" class="external">deps.dev</a>.</p>
<p>Would you be interested in a PR which adds this Action? Optionally, it can also publish your results to the OpenSSF REST API, which allows a <a href="https://openssf.org/blog/2022/09/08/show-off-your-security-score-announcing-scorecards-badges/" class="external">badge</a> with the project's score to be added to its README.</p>
<p>In case of doubts or concerns you can try to check <a href="https://github.com/ossf/scorecard/blob/main/docs/faq.md#frequently-asked-questions" class="external">Scorecards FAQ</a> or just reach out to me.</p> Ruby master - Misc #19050 (Closed): [ANN] Schedule maintenance for git.ruby-lang.orghttps://redmine.ruby-lang.org/issues/190502022-10-12T04:28:04Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>I have a plan to migrate instance type of git.ruby-lang.org on Oct 16, 2022 (JST).</p>
<p>During maintenance time, git.ruby-lang.org will be unavailable and rebooted.</p> Ruby master - Misc #19030 (Closed): [ANN] Migrate lists.ruby-lang.org to Google Groupshttps://redmine.ruby-lang.org/issues/190302022-09-29T07:30:53Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>Our mailing-list server that is <code>lists.ruby-lang.org</code> is too old. And it's difficult to replace new server on AWS because building mail-service on AWS has a lot of limitations. I and <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/12">@shugo (Shugo Maeda)</a> decided to migrate lists.ruby-lang.org to Google Groups.</p>
<ul>
<li>In Nov-Dec 2022, we migrate the current list member to Google Groups of our google workspace.</li>
<li>I hope to migrate to the last list-id, But I'm not sure we can do that.</li>
<li>What will be used as an archive viewer has yet to be TBD status.
<ul>
<li>blade is still down.</li>
<li>I prefer plain text viewer like blade instead of google groups. Should we build it?</li>
</ul>
</li>
</ul>
<p>I will update this plan in this thread.</p> Ruby master - Misc #18987 (Closed): [ANN] Sunsetting svn.ruby-lang.orghttps://redmine.ruby-lang.org/issues/189872022-08-31T01:03:00Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>svn.ruby-lang.org provides subversion write endpoint for stable maintainers and read endpoint for anonymous users. But Ruby 2.6 the last version, used subversion is EOL today.</p>
<p>I will shut down the subversion service of svn.ruby-lang.org on Nov 2022.</p>
<p>After that, svn.ruby-lang.org is only alias of git.ruby-lang.org. We focus to maintain only git server on that.</p> Ruby master - Misc #18976 (Closed): [ANN] blade.nagaokaut.ac.jp is downhttps://redmine.ruby-lang.org/issues/189762022-08-25T02:28:05Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>The mail archive server named <code>blade.nagaokaut.ac.jp</code> is down now.</p>
<p>blade had some hardware issues. Prof. Hara tries to salvage mail data and rebuild blade. But It's difficult status.</p>
<p>I have a plan to migrate Ruby mail server includes mailing-list to Google workspace. I also rebuild mail archives using Google groups or others.</p>
<p>Sorry for the inconvenient experience.</p>
<p>FYI: original announce in Japanese <a href="https://github.com/ruby-no-kai/official/issues/306#issuecomment-1207819210" class="external">https://github.com/ruby-no-kai/official/issues/306#issuecomment-1207819210</a></p> Ruby master - Bug #18912 (Closed): Build failure with Xcode 14 and macOS 13 (Ventura) Betahttps://redmine.ruby-lang.org/issues/189122022-07-14T05:40:17Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>TL;DR: We fixed this issue at Ruby 2.7-3.1 and master branch. But the stable versions are not released yet.</p>
<ul>
<li>Option 1: We strongly recommend to not upgrade Xcode 14 and its toolchains for macOS 12(Monterey) users. If you already update Xcode 14, you remove them with <code>sudo rm -rf /Library/Developer/CommandLineTools</code> and install Xcode 13.x or toolchains from <a href="https://developer.apple.com/download/all" class="external">https://developer.apple.com/download/all</a>
</li>
<li>Option 2: macOS 13 (Ventura) couldn't install Xcode13. We should add <code>--without=+,bigdecimal --enable-shared</code> to the <code>configure</code> option.</li>
</ul>
<hr>
<p>Today, I tried to build ruby master with macOS 13 (Ventura) Beta. It breaks the build status caused by Xcode 14 beta changes.</p>
<ol>
<li>Build failed without <code>--enable-shared</code>.</li>
</ol>
<p>I build ruby master without <code>--enable-shared</code> option. I got the following error.</p>
<pre><code>(snip)
linking shared-object -test-/arith_seq/extract.bundle
Undefined symbols for architecture arm64:
"_rb_arithmetic_sequence_extract", referenced from:
_arith_seq_s_extract in extract.o
"_rb_ary_new_capa", referenced from:
_arith_seq_s_extract in extract.o
"_rb_ary_store", referenced from:
_arith_seq_s_extract in extract.o
"_rb_define_singleton_method", referenced from:
_Init_extract in extract.o
"_rb_path2class", referenced from:
_Init_extract in extract.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</code></pre>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/51839">@katei (Yuta Saito)</a> says this error affects with <code>-undefined dynamic_lookup</code> flags.</p>
<ol start="2">
<li>Build error with bigdecimal</li>
</ol>
<p>With <code>--enabled-shared</code> resolved the first error. But I got the another build failure.</p>
<pre><code>compiling bigdecimal.c
In file included from bigdecimal.c:13:
In file included from ./bigdecimal.h:14:
./missing.h:127:1: error: static declaration of 'rb_rational_num' follows non-static declaration
rb_rational_num(VALUE rat)
^
../.././include/ruby/internal/intern/rational.h:128:7: note: previous declaration is here
VALUE rb_rational_num(VALUE rat);
^
In file included from bigdecimal.c:13:
In file included from ./bigdecimal.h:14:
(snip)
</code></pre>
<p>It's affected with <code>static inline</code> declaration in missing.h of bigdecimal.</p>
<ol start="3">
<li>test failure with mjit</li>
</ol>
<p>I could build with <code>--with-out-ext=+,bigdecimal --enable-share</code> option. But I also got the test failure with mjit.</p>
<pre><code>[215/402] TestMJIT#test_lambda_longjmp = 0.19 s
192) Failure:
TestMJIT#test_lambda_longjmp [/Users/hsbt/Documents/github.com/ruby/ruby/test/ruby/test_mjit.rb:1045]:
Expected 1 times of JIT success, but succeeded 0 times.
script:
"""
fib = lambda do |x|
return x if x == 0 || x == 1
fib.call(x-1) + fib.call(x-2)
end
print fib.call(5)
"""
stderr:
"""
Undefined symbols for architecture arm64:
"_mjit_call_p", referenced from:
__mjit0 in _ruby_mjit_p39885u0-643ab5.o
_vm_sendish in _ruby_mjit_p39885u0-643ab5.o
</code></pre>
<p>I already shared this to <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/10073">@k0kubun (Takashi Kokubun)</a> .</p>
<p>macOS 13 beta is still development status. I will track this until the official release date.</p> Ruby master - Misc #18888 (Closed): Migrate ruby-lang.org mail services to Google Domains and Goo...https://redmine.ruby-lang.org/issues/188882022-06-30T03:22:15Zshugo (Shugo Maeda)
<p>Currently mail services of ruby-lang.org including mailing lists are running on an aged server, and we have to replace it.<br>
We are planning to migrate the mail services to Google Domains and Google Workspace (Google Groups).</p>
<p>The maximum numbr of Google Domains email aliases is 100, but currently ruby-lang.org has 153 email aliases, so we have to reduce them.<br>
The number of active committers listed in <a href="https://github.com/ruby/ruby-commit-hook/blob/master/config/email.yml" class="external">email.yml</a> is 58.</p> Ruby master - Misc #18800 (Rejected): The administrator requires you to enable two-factor authent...https://redmine.ruby-lang.org/issues/188002022-05-24T13:11:29ZDan0042 (Daniel DeLorme)
<p>Can we please disable mandatory two-factor authentication in this tracker? Offering 2fa is great, but being mandatory is not. For my part I find it completely overblown and superfluous for a site such as this. (And if it's mandatory why is there even a "Disable" link in my account settings?)</p> Ruby master - Bug #18790 (Closed): cannot load such file -- digest (LoadError)https://redmine.ruby-lang.org/issues/187902022-05-19T04:43:28Zk0kubun (Takashi Kokubun)takashikkbn@gmail.com
<p>I got asked by <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/572">@hsbt (Hiroshi SHIBATA)</a> to file this.</p>
<a name="Backtrace"></a>
<h2 >Backtrace<a href="#Backtrace" class="wiki-anchor">¶</a></h2>
<pre><code>configuring psych
/home/k0kubun/src/github.com/ruby/ruby/tool/extlibs.rb:7:in `require': cannot load such file -- digest (LoadError)
from /home/k0kubun/src/github.com/ruby/ruby/tool/extlibs.rb:7:in `<top (required)>'
from /home/k0kubun/src/github.com/ruby/ruby/ext/psych/extconf.rb:24:in `require_relative'
from /home/k0kubun/src/github.com/ruby/ruby/ext/psych/extconf.rb:24:in `<top (required)>'
from ../ext/extmk.rb:217:in `load'
from ../ext/extmk.rb:217:in `block in extmake'
from /home/k0kubun/src/github.com/ruby/ruby/lib/mkmf.rb:324:in `open'
from ../ext/extmk.rb:213:in `extmake'
from ../ext/extmk.rb:577:in `block in <main>'
from ../ext/extmk.rb:573:in `each'
from ../ext/extmk.rb:573:in `<main>'
make[1]: *** [ext/configure-ext.mk:105: ext/psych/exts.mk] Error 1
make[1]: Leaving directory '/home/k0kubun/src/github.com/ruby/ruby/.ruby'
make: *** [uncommon.mk:289: exts.mk] Error 2
</code></pre>
<a name="How-to-reproduce"></a>
<h2 >How to reproduce<a href="#How-to-reproduce" class="wiki-anchor">¶</a></h2>
<p>Build ruby without libyaml-dev (?). My build was fixed once I run the apt-get command written in <a href="https://github.com/rbenv/ruby-build/wiki" class="external">https://github.com/rbenv/ruby-build/wiki</a>, which was probably auto-removed when I upgraded Ubuntu 20.04 to 22.04.</p> Ruby master - Bug #18789 (Feedback): make test-bundled-gems failed after make installhttps://redmine.ruby-lang.org/issues/187892022-05-18T01:01:41Zznz (Kazuhiro NISHIYAMA)
<p>On snapshot-master CI, <code>make test-bundled-gems</code> failed.</p>
<p><a href="https://github.com/ruby/actions/runs/6476724416?check_suite_focus=true#step:17:118" class="external">https://github.com/ruby/actions/runs/6476724416?check_suite_focus=true#step:17:118</a></p>
<pre><code>./tool/test-bundled-gems.rb:10:in `realpath': No such file or directory @ realpath_rec - /home/runner/work/actions/actions/snapshot-master/.bundle/bin/rake (Errno::ENOENT)
from ./tool/test-bundled-gems.rb:10:in `<main>'
make: *** [uncommon.mk:1410: test-bundled-gems-run] Error 1
</code></pre>
<p>I investigated it, it causes after <code>make install</code>.</p>
<p>How to reproduce:</p>
<ol>
<li>Run configure</li>
<li><code>make install</code></li>
<li><code>make test-bundled-gems</code></li>
</ol>
<p>or</p>
<p>In already built directory</p>
<ol>
<li><code>rm -rf path/to/srcdir/.bundle</code></li>
<li><code>make install</code></li>
<li><code>make test-bundled-gems</code></li>
</ol>
<p>If I run <code>rm -rf path/to/srcdir/.bundle</code> and <code>make test-bundled-gems</code> without <code>make install</code>, <code>.bundle/bin/rake</code> exists.</p> Ruby master - Misc #18687 (Closed): [ANN] Upgraded bugs.ruby-lang.org to Redmine 5.0https://redmine.ruby-lang.org/issues/186872022-04-09T06:06:05Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>Today, I migrated this tracker Redmine 4.2 to 5.0.</p>
<p>It has the following major changes.</p>
<ul>
<li>Based on Rails 6.1.</li>
<li>Allowed username mention like <code>@hsbt</code> with autocomplete.</li>
<li>Support CommonMaker for Markdown formatting.</li>
</ul>
<p>Release note is here: <a href="https://www.redmine.org/news/135" class="external">https://www.redmine.org/news/135</a></p>
<p>And I change the Ruby runtime version to 3.1 with <code>--jit</code> option on Heroku.</p>
<p>If you have any issues with this change. Please comment this ticket or file to <a href="https://github.com/ruby/b.r-l.o/issues" class="external">https://github.com/ruby/b.r-l.o/issues</a>.</p>
<p>Thanks all.</p> Ruby master - Bug #18666 (Feedback): No rule to make target 'yaml/yaml.h', needed by 'api.o'https://redmine.ruby-lang.org/issues/186662022-03-28T00:59:37Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<p>When updating my Ruby compilation with <code>make up; make</code>, I hit the following error:</p>
<pre><code>make[2]: Entering directory '/home/duerst/14ruby/ext/psych'
make[2]: *** No rule to make target 'yaml/yaml.h', needed by 'api.o'. Stop.
make[2]: Leaving directory '/home/duerst/14ruby/ext/psych'
make[1]: *** [exts.mk:262: ext/psych/all] Error 2
make[1]: Leaving directory '/home/duerst/14ruby'
make: *** [uncommon.mk:307: build-ext] Error 2
</code></pre>
<p><code>./ruby -v</code> is <code>ruby 3.2.0dev (2022-03-22T19:51:05Z master 0140e6c41e) [x86_64-linux]</code></p>
<p>All of this is on Ubuntu 20.04 on WSL2 on Windows 10.</p>
<p>My guess is that this bug is related to recent changes in psych/yaml/...</p> Ruby master - Bug #18643 (Closed): test-bundler failed on ruby_3_1 CIhttps://redmine.ruby-lang.org/issues/186432022-03-18T04:25:49Zznz (Kazuhiro NISHIYAMA)
<p>I think that this spec has failed since newer bundler released.</p>
<p><a href="https://github.com/ruby/actions/runs/5590419280?check_suite_focus=true#step:18:199" class="external">https://github.com/ruby/actions/runs/5590419280?check_suite_focus=true#step:18:199</a></p>
<pre><code>
expected "Running `bundle update --bundler \"> 0.a\"` with bundler 2.3.7\nHTTP GET https://index.rubygems.org/...ctions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/rack-1.2.gemspec\nBundle updated!" to include "Using bundler 2.3.7\n"
Diff:
@@ -1,19 +1,37 @@
-Using bundler 2.3.7\n
+Running `bundle update --bundler "> 0.a"` with bundler 2.3.7
+HTTP GET https://index.rubygems.org/versions
+HTTP 200 OK https://index.rubygems.org/versions
+Fetching gem metadata from https://rubygems.org/
+Looking up gems ["bundler"]
+HTTP GET https://index.rubygems.org/info/bundler
+HTTP 200 OK https://index.rubygems.org/info/bundler
+Updating bundler to 2.3.9.
+Fetching bundler 2.3.9
+Installing bundler 2.3.9
+Running `bundle update --bundler "> 0.a"` with bundler 2.3.9
+Found no changes, using resolution from the lockfile
+Using bundler 2.3.9
+0: bundler (2.3.9) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/bundler-2.3.9.gemspec
+Using prints_loaded_gems 1.0
+0: prints_loaded_gems (1.0) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/prints_loaded_gems-1.0.gemspec
+Using rack 1.2
+0: rack (1.2) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/rack-1.2.gemspec
+Bundle updated!
# ./spec/bundler/commands/binstubs_spec.rb:229:in `block (5 levels) in <top (required)>'
# ./spec/bundler/spec_helper.rb:101:in `block (4 levels) in <top (required)>'
# ./spec/bundler/spec_helper.rb:101:in `block (3 levels) in <top (required)>'
# ./spec/bundler/support/helpers.rb:350:in `block in with_gem_path_as'
# ./spec/bundler/support/helpers.rb:364:in `without_env_side_effects'
# ./spec/bundler/support/helpers.rb:345:in `with_gem_path_as'
# ./spec/bundler/spec_helper.rb:100:in `block (2 levels) in <top (required)>'
</code></pre>
<p>It can reproduce with a small example.</p>
<p>Spec expects 3.0's behavior:</p>
<pre><code>$ rbenv local 3.0.3
$ bundle init
Writing new Gemfile to /tmp/x/Gemfile
$ bundle i
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle update --bundler "> 0.a"
The Gemfile specifies no dependencies
Bundle updated!
$
</code></pre>
<p>Actual 3.1's behavior:</p>
<pre><code>$ rbenv local 3.1.1
$ bundle init
Writing new Gemfile to /tmp/x/Gemfile
$ bundle i
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle update --bundler "> 0.a"
Fetching gem metadata from https://rubygems.org/.
The Gemfile specifies no dependencies
Bundle updated!
$
</code></pre>
<p>I'm not sure which is expected behavior: spec's or changed implementation.</p> Ruby master - Bug #18614 (Closed): Error (busy loop) in TestGemCommandsSetupCommand#test_destdir_...https://redmine.ruby-lang.org/issues/186142022-03-08T08:39:15Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<p>When running <code>make check</code>, I get a busy loop in<br>
<code>TestGemCommandsSetupCommand#test_destdir_flag_does_not_try_to_write_to_the_default_gem_home</code><br>
every time I try. When excluding this test<br>
(by changing the method name to <code>_test_destdir_flag_does_not_try_to_write_to_the_default_gem_home</code>),<br>
things work as usual (17 errors related to <code>TestNetHTTPS</code>/<code>TestNetHTTPLocalBind</code>).<br>
The relevant file is <code>test/rubygems/test_gem_commands_setup_command.rb</code>. When running only that file,<br>
I get two failures and two errors. One of the errors says</p>
<pre><code>TestGemCommandsSetupCommand#test_destdir_flag_does_not_try_to_write_to_th
1) Error:
TestGemCommandsSetupCommand#test_destdir_flag_does_not_try_to_write_to_the_default_gem_home:
Gem::FilePermissionError: You don't have write permissions for the /home/duerst/14ruby/tmp/test_rubygems_20220308-18434-8gq4j4/gemhome/plugins directory.
</code></pre>
<p>This is on Windows 10/WSL/Ubuntu 20.04.</p> Ruby master - Bug #18584 (Closed): List of Rubies has an errorhttps://redmine.ruby-lang.org/issues/185842022-02-13T11:18:31Zthoran (thoran not blank)
<p>There was nowhere obvious on <a href="https://www.ruby-lang.org" class="external">https://www.ruby-lang.org</a> about where to report this problem, so I figured here was as good a place as any...</p>
<p>The name for this entry on <a href="https://cache.ruby-lang.org/pub/ruby/index.txt" class="external">https://cache.ruby-lang.org/pub/ruby/index.txt</a> is wrong:</p>
<p>ruby-1.8.7-preview4.tar <a href="https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-preview4.tar.zip" class="external">https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-preview4.tar.zip</a> a172645d4d4ba50aa5d68dc891742bf254253ded 27cf4c38c2ff9ae6045f7eefcf5164a30a69b1042af64cf729dc180363e629f8 ee67b089774cbf25e667195614e0ee363b0f5cf83aae6fe0fe3fb654ee3dd42eac7c0b436da7069f5b1df1b67c331855f0d787ed5b9c78d18b2bb731286979cc</p>
<p>It should be (sans ".tar"):</p>
<p>ruby-1.8.7-preview4 <a href="https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-preview4.tar.zip" class="external">https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-preview4.tar.zip</a> a172645d4d4ba50aa5d68dc891742bf254253ded 27cf4c38c2ff9ae6045f7eefcf5164a30a69b1042af64cf729dc180363e629f8 ee67b089774cbf25e667195614e0ee363b0f5cf83aae6fe0fe3fb654ee3dd42eac7c0b436da7069f5b1df1b67c331855f0d787ed5b9c78d18b2bb731286979cc</p>
<p>I discovered this whilst parsing the page for automating keeping Rubies updated.</p> Ruby master - Feature #18571 (Closed): Removed the bundled sources from release package after Rub...https://redmine.ruby-lang.org/issues/185712022-02-04T11:45:12Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>We shipped release package with the 3rd party source for mswin environment especially.</p>
<p>The current status is here:</p>
<ul>
<li>libyaml: psych gem, ruby repo and package always bundled it.</li>
<li>libffi: only ruby package bundled it. fiddle gem and repo are not bundled.</li>
<li>zlib: gem, ruby repo and package don't bundled.</li>
</ul>
<p>I propose we stop bundling the third-party source for security and maintenance reasons. Because we have <a href="https://github.com/microsoft/vcpkg" class="external">vcpkg</a> for mswin environment today. So, vcpkg provides the runtime for psych, fiddle and zlib.</p> Ruby master - Bug #18567 (Closed): Depending on default gems in stdlib gems when not needed consi...https://redmine.ruby-lang.org/issues/185672022-02-02T11:22:40ZEregon (Benoit Daloze)
<p>CRuby over time moves more and more code to default gems, to bundled gems and or even stops shipping some gems which used to be stdlibs (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Gemifying Ruby standard library (Closed)" href="https://redmine.ruby-lang.org/issues/5481">#5481</a>).<br>
I believe the main motivation for that is being to fix security issues without needing to make a CRuby release, and that makes sense.</p>
<p>There are however multiple unwanted side effects of this:</p>
<ol>
<li>Removing gems from stdlib (e.g., <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Update of default gems in Ruby 3.1 (Closed)" href="https://redmine.ruby-lang.org/issues/17873">#17873</a>) is a breaking change, which makes upgrading to a new Ruby version more difficult.<br>
I think this should only be done if there is a clear gain.<br>
Being a default gem is already enough to fix a security issue without a CRuby release.</li>
<li>When any gem depends on a default gem, it tends to break on all Ruby implementations except CRuby, and for older Ruby versions.</li>
</ol>
<p>Let's focus on this second point.<br>
There can be good reasons to depend on a specific version (or ~>/>=) of a default gem, for instance to ensure a given security issue is addressed.<br>
In other cases, I think there is no value to depend explicitly on a default gem, it would work without an explicit dependency since it is still "in stdlib".</p>
<p>And it is actually harmful to depend on default gems for JRuby, TruffleRuby and older Ruby versions, because the default gem does typically not work there yet, but the stdlib works just fine!<br>
The reason for that is simple, those gems used to be stdlib and so were implemented directly in the Ruby implementation.</p>
<p>Also depending on default gem will typically be redundant with what's in stdlib, which is then a waste of network, time and disk.</p>
<p>For larger default gems (e.g., openssl), I believe the solution is those gems to support JRuby, TruffleRuby, etc.<br>
This is useful so the behavior for a given version of the gem is compatible between Ruby implementations, has the same security fixes, etc.<br>
It is however a large effort and overhead to do this, and it only makes sense if people are going to need to depend on such a gem explicitly (either for security or new features in a given version), otherwise the version in stdlib is good enough and much simpler.</p>
<p>Here are I think some clear cases of default gems which are clearly more overhead than what they gain:</p>
<ul>
<li>io-wait: just a few methods very tight to IO internals, should really be core</li>
<li>io-nonblock just a few methods very tight to IO internals, should really be core</li>
<li>digest: has a public header and so versioning it doesn't work. Also it makes sense to reuse e.g. MessageDigest on JVM for better performance.</li>
<li>strscan: this accesses a lot of Regexp internal, it would fit better in each implementation repo as a non-gem stdlib.</li>
</ul>
<p>These are all small, they are all fairly stable, and it's unclear why they are even default gems in the first place.<br>
They also seem fairly unlikely to have security issues.</p>
<p>So this is what I propose:</p>
<ul>
<li>Do not depend on default gems in stdlib gems unless necessary (for security or feature), or unless we know the next version of Ruby will no longer ship that gem. An example is <code>net-protocol</code> depending needlessly on <code>io-wait</code>, I'll make a PR for that.</li>
<li>I think those gems listed just above should no longer be default gems in the future to clarify the situation. They should either be core or regular non-gem stdlib.</li>
</ul> Ruby master - Misc #18493 (Closed): zverok as a commiterhttps://redmine.ruby-lang.org/issues/184932022-01-14T19:32:41Zzverok (Victor Shepelev)zverok.offline@gmail.com
<p>I feel uneasy asking for myself (as far as I can understand, it is normal that other core team member proposes new contributors), but well... I am Ukrainian, and am not exactly subtle.</p>
<p>So... Can I receive a commit rights?</p>
<a name="About-me"></a>
<h2 >About me<a href="#About-me" class="wiki-anchor">¶</a></h2>
<p>I use Ruby professionally as my main language since 2004, and interested in language's evolution since around that time.</p>
<p>I am author of many <a href="https://zverok.github.io/blog/" class="external">blog articles on Ruby</a>, several <a href="https://rubygems.org/profiles/zverok" class="external">Ruby gems</a>, a few <a href="https://zverok.github.io/talks.html" class="external">conference talks</a>.</p>
<p>I maintain <a href="https://rubyreferences.github.io/rubychanges/" class="external">Ruby Changes</a> annotated changelog for each version since 2.4 (and plan to extend it back to historical versions); and <a href="https://rubyreferences.github.io/rubyref/" class="external">Ruby Reference</a> attempt to compile readable "semi-official" reference. This work was recognized by Fukuoka Ruby award.</p>
<p>I contributed several <a href="https://zverok.github.io/ruby.html#ruby-features" class="external">Ruby features</a> (mostly on idea level) and <a href="https://zverok.github.io/ruby.html#documenting-ruby" class="external">documentation improvements</a> (including reviewing of docs status before each version release and catching up on under-documented features).</p>
<a name="Why-do-I-want-it"></a>
<h2 >Why do I want it<a href="#Why-do-I-want-it" class="wiki-anchor">¶</a></h2>
<p>TBH, one of the reasons is some "sense of belonging". I would be happy to think about myself as just "Ruby commiter" not "that guy who did this and that but not a part of the team".</p>
<p>More seriously, I am dedicated to Ruby's documentation quality, and willing to take a responsibility to work on it on a more systematic way. It requires at least more rights on Issue Tracker (assigning tickets, closing tickets, etc) and GitHub (adding labels, reviewing PRs etc).</p>
<p><em>(It seems to me that sometimes others got confused assuming I can merge my small docs PRs myself <a href="https://bugs.ruby-lang.org/issues/18404#note-32" class="external">until reminded otherwise</a>)</em></p>
<a name="What-do-I-want-to-do-as-a-committer"></a>
<h2 >What do I want to do as a committer<a href="#What-do-I-want-to-do-as-a-committer" class="wiki-anchor">¶</a></h2>
<ul>
<li>Create and maintain some perpetual list of documentation problems and possible improvements;</li>
<li>Review new feature PRs and clarify what needs to be documented; provide follow-up documentation PRs;</li>
<li>Regular reviews of how docs are rendered to avoid rendering problems due to unrelated changes (<a href="https://github.com/ruby/ruby/pull/2810/files" class="external">example</a>)</li>
<li>Maybe move forward on the idea Matz once had (<a class="issue tracker-5 status-2 priority-4 priority-default" title="Misc: Improving `www.ruby-lang.org` reference by merging with `rubyreferences.github.io` (Assigned)" href="https://redmine.ruby-lang.org/issues/16512">#16512</a>) to merge my effort on more logical/modern official docs?</li>
</ul>
<p><em>NB: I have some ideas for new language features but obviously wouldn't abuse commit rights to merge them.</em></p>
<a name="Counter-points"></a>
<h2 >Counter-points<a href="#Counter-points" class="wiki-anchor">¶</a></h2>
<p>I am not 100% sure I am qualified to be responsible for (some parts of) documentation being non-native speaker. My English became better during recent years, but it is still far from flawless. I am trying to use spell- and grammar-checking software, but not sure it fully compensates for my flaws.</p> Ruby master - Misc #18488 (Closed): Add katei as a commiterhttps://redmine.ruby-lang.org/issues/184882022-01-14T03:49:28Zmame (Yusuke Endoh)mame@ruby-lang.org
<p>Hi,</p>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/17">@ko1 (Koichi Sasada)</a> and I would like to recommend we add katei-san (<a href="https://github.com/kateinoigakukun" class="external">https://github.com/kateinoigakukun</a>) as a committer.</p>
<p>He has sent <a href="https://github.com/ruby/ruby/pulls?q=author%3Akateinoigakukun" class="external">about ten pull requests to ruby</a>, and all of them have been merged. He is now working on porting Ruby to WASI (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Proposal to merge WASI based WebAssembly support (Closed)" href="https://redmine.ruby-lang.org/issues/18462">#18462</a>). After it is merged, we need a maintainer of the platform.</p>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/51839">@katei (Yuta Saito)</a> Can you be a Ruby comitter and a platform maintainer for WASI?</p>
<p>Thanks!</p> Ruby master - Bug #18431 (Closed): Ruby 2.6.9, bundler 1.17.2 and CVE-2021-43809 https://redmine.ruby-lang.org/issues/184312021-12-24T15:00:16Znpic1 (Nat Pic1)
<p>Hi,<br>
Ruby 2.6.9 ships with bundler 1.17.2, which is affected by CVE-2021-43809.<br>
Is there a plan to upgrade it to resolve the issue?</p>
<p>I saw that in the past, there was an upgrade and then a downgrade because of some issue:<br>
<a href="https://git.ruby-lang.org/ruby.git/commit/?id=91533d9ab17a08385381d87991e01e8674e069a1" class="external">https://git.ruby-lang.org/ruby.git/commit/?id=91533d9ab17a08385381d87991e01e8674e069a1</a></p>
<p>Thanks a lot,<br>
Regards<br>
Nat</p> Ruby master - Bug #18400 (Closed): Cannot require 'prime' in irb @ 3.1.0.preview1https://redmine.ruby-lang.org/issues/184002021-12-09T14:17:27Zchooosen (Piotr Wasiak)
<a name="Description"></a>
<h2 >Description<a href="#Description" class="wiki-anchor">¶</a></h2>
<p>If I run <code>ruby script.rb</code> with <code>require 'prime'</code> then it will work fine.</p>
<p>But after entering irb, I can <code>require 'net/http'</code> , but with <strong>prime</strong> I get following error.<br>
Problem occurs with:</p>
<blockquote>
<p>The following default gems are now bundled gems.<br>
net-ftp<br>
net-imap<br>
net-pop<br>
net-smtp<br>
matrix<br>
prime</p>
</blockquote>
<a name="How-to-reproduce"></a>
<h1 >How to reproduce<a href="#How-to-reproduce" class="wiki-anchor">¶</a></h1>
<p>Install ruby 2.3.0.preview1</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="o">></span> <span class="n">bundle</span> <span class="o">-</span><span class="n">v</span>
<span class="no">Bundler</span> <span class="n">version</span> <span class="mf">2.3</span><span class="o">.</span><span class="mi">0</span><span class="p">.</span><span class="nf">dev</span>
<span class="o">></span> <span class="n">bundle</span> <span class="nb">exec</span> <span class="n">irb</span>
<span class="n">irb</span><span class="p">(</span><span class="n">main</span><span class="p">):</span><span class="mo">001</span><span class="p">:</span><span class="mi">0</span><span class="o">></span> <span class="nb">require</span> <span class="s1">'prime'</span>
</code></pre>
<p>The same was on bundler 2.2.33</p>
<a name="Expected-result"></a>
<h1 >Expected result<a href="#Expected-result" class="wiki-anchor">¶</a></h1>
<p>prime bundled with ruby gem is loaded.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="kp">true</span>
</code></pre>
<a name="Actual-result"></a>
<h1 >Actual result¶<a href="#Actual-result" class="wiki-anchor">¶</a></h1>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="p">(</span><span class="n">irb</span><span class="p">):</span><span class="mi">1</span><span class="ss">:in</span> <span class="sb">`require': cannot load such file -- prime (LoadError)
from (irb):1:in `</span><span class="o"><</span><span class="n">main</span><span class="o">></span><span class="s1">'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/gems/3.1.0/gems/irb-1.3.8.pre.11/exe/irb:11:in `<top (required)>'</span>
<span class="n">from</span> <span class="sr">/Users/use</span><span class="n">r</span><span class="o">/</span><span class="p">.</span><span class="nf">rbenv</span><span class="o">/</span><span class="n">versions</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">-</span><span class="n">preview1</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">irb</span><span class="p">:</span><span class="mi">25</span><span class="ss">:in</span> <span class="sb">`load'
from /Users/user/.rbenv/versions/3.1.0-preview1/bin/irb:25:in `</span><span class="o"><</span><span class="n">top</span> <span class="p">(</span><span class="n">required</span><span class="p">)</span><span class="o">></span><span class="s1">'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'</span>
<span class="n">from</span> <span class="sr">/Users/use</span><span class="n">r</span><span class="o">/</span><span class="p">.</span><span class="nf">rbenv</span><span class="o">/</span><span class="n">versions</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">-</span><span class="n">preview1</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">ruby</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">/</span><span class="n">bundler</span><span class="o">/</span><span class="n">cli</span><span class="o">/</span><span class="nb">exec</span><span class="p">.</span><span class="nf">rb</span><span class="p">:</span><span class="mi">58</span><span class="ss">:in</span> <span class="sb">`kernel_load'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `</span><span class="n">run</span><span class="s1">'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli.rb:478:in `exec'</span>
<span class="n">from</span> <span class="sr">/Users/use</span><span class="n">r</span><span class="o">/</span><span class="p">.</span><span class="nf">rbenv</span><span class="o">/</span><span class="n">versions</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">-</span><span class="n">preview1</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">ruby</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">/</span><span class="n">bundler</span><span class="o">/</span><span class="n">vendor</span><span class="o">/</span><span class="n">thor</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">thor</span><span class="o">/</span><span class="n">command</span><span class="p">.</span><span class="nf">rb</span><span class="p">:</span><span class="mi">27</span><span class="ss">:in</span> <span class="sb">`run'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `</span><span class="n">invoke_command</span><span class="s1">'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'</span>
<span class="n">from</span> <span class="sr">/Users/use</span><span class="n">r</span><span class="o">/</span><span class="p">.</span><span class="nf">rbenv</span><span class="o">/</span><span class="n">versions</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">-</span><span class="n">preview1</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">ruby</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">/</span><span class="n">bundler</span><span class="o">/</span><span class="n">cli</span><span class="p">.</span><span class="nf">rb</span><span class="p">:</span><span class="mi">31</span><span class="ss">:in</span> <span class="sb">`dispatch'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `</span><span class="n">start</span><span class="s1">'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'</span>
<span class="n">from</span> <span class="sr">/Users/use</span><span class="n">r</span><span class="o">/</span><span class="p">.</span><span class="nf">rbenv</span><span class="o">/</span><span class="n">versions</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">-</span><span class="n">preview1</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">ruby</span><span class="o">/</span><span class="n">gems</span><span class="o">/</span><span class="mf">3.1</span><span class="o">.</span><span class="mi">0</span><span class="o">/</span><span class="n">gems</span><span class="o">/</span><span class="n">bundler</span><span class="o">-</span><span class="mf">2.3</span><span class="o">.</span><span class="mi">0</span><span class="p">.</span><span class="nf">dev</span><span class="o">/</span><span class="n">libexec</span><span class="o">/</span><span class="n">bundle</span><span class="p">:</span><span class="mi">49</span><span class="ss">:in</span> <span class="sb">`block in <top (required)>'
from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `</span><span class="n">with_friendly_errors</span><span class="err">'</span>
<span class="o">...</span> <span class="mi">3</span> <span class="n">levels</span><span class="o">...</span>
</code></pre> Ruby master - Bug #18398 (Closed): bundler cannot install digesthttps://redmine.ruby-lang.org/issues/183982021-12-09T05:33:16ZTietew (Toru Iwase)tietew@tietew.net
<p><code>bundle install</code> gives up installing <code>digest</code> gem<br>
due to trying to write <code>digest.so</code> in global site_ruby directory (not writable).</p>
<a name="How-to-reproduce"></a>
<h1 >How to reproduce<a href="#How-to-reproduce" class="wiki-anchor">¶</a></h1>
<p>In clean directory, create a following Gemfile:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">source</span> <span class="s1">'https://rubygems.org'</span>
<span class="n">gem</span> <span class="s1">'net-smtp'</span>
</code></pre>
<p>Set bundle path to <code>vendor/bundle</code> and install.</p>
<pre><code>$ bundle -v
Bundler version 2.3.0.dev
$ bundle config set --local path vendor/bundle
$ bundle install
</code></pre>
<a name="Expected-result"></a>
<h1 >Expected result<a href="#Expected-result" class="wiki-anchor">¶</a></h1>
<p>All gems are successfully installed in <code>vendor/bundle</code>.</p>
<a name="Actual-result"></a>
<h1 >Actual result<a href="#Actual-result" class="wiki-anchor">¶</a></h1>
<pre><code>$ bundle install
Fetching gem metadata from https://rubygems.org/.
Using bundler 2.3.0.dev
Using io-wait 0.2.1
Using timeout 0.2.0
Fetching digest 3.0.0
Using net-protocol 0.1.2
Installing digest 3.0.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/bin/ruby -I
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0 -r
./siteconf20211209-660991-1c5c0k.rb extconf.rb
creating Makefile
current directory:
/***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
make DESTDIR\= clean
current directory:
/***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
make DESTDIR\=
compiling digest.c
linking shared-object digest.so
current directory:
/***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
make DESTDIR\= install
/usr/bin/install -c -m 0755 digest.so ./.gem.20211209-660991-1jo093
/usr/bin/mkdir: cannot create directory
‘/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/include/ruby-3.1.0/site_ruby’: Permission denied
make: *** [Makefile:212: .sitehdrdir.time] Error 1
make install failed, exit code 2
Gem files will remain installed in
/***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0 for
inspection.
Results logged to
/***/test/ruby31/vendor/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0-static/digest-3.0.0/gem_make.out
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:44:in `block in make'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in `each'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:36:in `make'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in build_extensions'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/rubygems/installer.rb:837:in `build_extensions'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/rubygems_gem_installer.rb:28:in `install'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/source/rubygems.rb:204:in `install'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:54:in `install'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:186:in `do_install'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/worker.rb:62:in `apply_func'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/worker.rb:57:in `block in process_queue'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/worker.rb:54:in `loop'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/worker.rb:54:in `process_queue'
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/worker.rb:91:in `block (2 levels) in create_threads'
An error occurred while installing digest (3.0.0), and Bundler cannot
continue.
In Gemfile:
net-smtp was resolved to 0.3.0, which depends on
digest
</code></pre>
<p>digest-3.0.0/gem_make.out</p>
<pre><code>current directory: /***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/bin/ruby -I /usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/lib/ruby/3.1.0 -r ./siteconf20211209-660991-1c5c0k.rb extconf.rb
creating Makefile
current directory: /***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
make DESTDIR\= clean
current directory: /***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
make DESTDIR\=
compiling digest.c
linking shared-object digest.so
current directory: /***/test/ruby31/vendor/bundle/ruby/3.1.0/gems/digest-3.0.0/ext/digest
make DESTDIR\= install
/usr/bin/install -c -m 0755 digest.so ./.gem.20211209-660991-1jo093
/usr/bin/mkdir: cannot create directory ‘/usr/local/anyenv/envs/rbenv/versions/3.1.0-dev/include/ruby-3.1.0/site_ruby’: Permission denied
make: *** [Makefile:212: .sitehdrdir.time] Error 1
make install failed, exit code 2
</code></pre> Ruby master - Bug #18381 (Closed): Default vs Bundled gemshttps://redmine.ruby-lang.org/issues/183812021-12-02T13:24:43Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>Could there be documented what is the difference between default and bundled gems? E.g.</p>
<ul>
<li>Are the Bundled gems considered a part of StdLib or not?</li>
<li>What is general strategy for the future, seeing more and more gems moving from default to bundled gems in Ruby 3.1</li>
<li>Default gems does not need to be listed in Gemfile where Bundled gems needs to be listed in Gemfile</li>
<li>Default gems can be used without RubyGems where Bundled gems requires RubyGems</li>
</ul> Ruby master - Bug #18355 (Feedback): require("pathname") within rack application chnages behavior...https://redmine.ruby-lang.org/issues/183552021-11-21T01:05:59Zume-san (Toshi Umehara)
<a name="Environment"></a>
<h2 >Environment<a href="#Environment" class="wiki-anchor">¶</a></h2>
<p>Ruby 3.0.2 is installed on Fedora 34 from source.<br>
'gem update' is conducted, and there are two versions of 'pathname' gems (0.2.0, default: 0.1.0) installed as follows.</p>
<pre><code>> uname -a
Linux localhost.localdomain 5.14.18-200.fc34.x86_64 #1 SMP Fri Nov 12 16:48:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
> ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
> gem update --system
> gem update
> gem list
...
pathname (0.2.0, default: 0.1.0)
...
</code></pre>
<a name="Code"></a>
<h2 >Code<a href="#Code" class="wiki-anchor">¶</a></h2>
<p>The following files, Gemfile and config.ru, are placed in the same directory.</p>
<pre><code># Gemfile
source 'https://rubygems.org/'
gem 'rack'
gem 'webrick'
</code></pre>
<pre><code># config.ru
class Application
def call(env)
status = 200
headers = { "Content-Type" => "text/html" }
path = Dir.pwd()
pathname1 = Pathname.new(path)
require("pathname")
pathname2 = Pathname.new(path)
body = ["#{pathname1.absolute?} #{pathname2.absolute?}"]
[status, headers, body]
end
end
run Application.new
</code></pre>
<a name="Command"></a>
<h2 >Command<a href="#Command" class="wiki-anchor">¶</a></h2>
<p>Web server starts using the following commands.</p>
<pre><code>bundle config set --local path 'vendor/bundle'
bundle install
bundle exec rackup -s webrick
</code></pre>
<ul>
<li>Output on the console</li>
</ul>
<pre><code>[2021-11-21 09:44:13] INFO WEBrick 1.7.0
[2021-11-21 09:44:13] INFO ruby 3.0.2 (2021-07-07) [x86_64-linux]
[2021-11-21 09:44:13] INFO WEBrick::HTTPServer#start: pid=2770 port=9292
</code></pre>
<a name="Expected-Result"></a>
<h2 >Expected Result<a href="#Expected-Result" class="wiki-anchor">¶</a></h2>
<p>Accessing localhost:9292 using a web browser , 'true true' is an expected result on the browser, because pathname1 and pathanme2 are generated from the same absolute path in the above code.</p>
<pre><code>true true
</code></pre>
<a name="Actual-Result"></a>
<h2 >Actual Result<a href="#Actual-Result" class="wiki-anchor">¶</a></h2>
<p>Accessing localhost:9292 shows the following messages on the browser and the console. After 'require("pathname")', Pathname.absolute?() retuns false, even if represents an absolute path.</p>
<ul>
<li>On the browser</li>
</ul>
<pre><code>true false
</code></pre>
<ul>
<li>On the console</li>
</ul>
<pre><code>/home/toshihiro/Ruby3/lib/ruby/3.0.0/pathname.rb:20: warning: already initialized constant Pathname::TO_PATH
/home/toshihiro/Ruby3/lib/ruby/gems/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:20: warning: previous definition of TO_PATH was here
/home/toshihiro/Ruby3/lib/ruby/3.0.0/pathname.rb:22: warning: already initialized constant Pathname::SAME_PATHS
/home/toshihiro/Ruby3/lib/ruby/gems/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:22: warning: previous definition of SAME_PATHS was here
/home/toshihiro/Ruby3/lib/ruby/3.0.0/pathname.rb:34: warning: already initialized constant Pathname::SEPARATOR_LIST
/home/toshihiro/Ruby3/lib/ruby/gems/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:34: warning: previous definition of SEPARATOR_LIST was here
/home/toshihiro/Ruby3/lib/ruby/3.0.0/pathname.rb:35: warning: already initialized constant Pathname::SEPARATOR_PAT
/home/toshihiro/Ruby3/lib/ruby/gems/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:35: warning: previous definition of SEPARATOR_PAT was here
/home/toshihiro/Ruby3/lib/ruby/3.0.0/pathname.rb:41: warning: already initialized constant Pathname::ABSOLUTE_PATH
/home/toshihiro/Ruby3/lib/ruby/gems/3.0.0/gems/pathname-0.2.0/lib/pathname.rb:41: warning: previous definition of ABSOLUTE_PATH was here
127.0.0.1 - - [21/Nov/2021:09:44:20 +0900] "GET / HTTP/1.1" 200 10 0.0339
</code></pre>
<a name="Segmentation-fault"></a>
<h2 >Segmentation fault<a href="#Segmentation-fault" class="wiki-anchor">¶</a></h2>
<p>Moreover, press Ctrl-c to stop the Rack application, the application causes a segmentation fault.</p>
<p>The segmentation fault message is attached.</p>
<a name="Notes"></a>
<h2 >Notes<a href="#Notes" class="wiki-anchor">¶</a></h2>
<p>Uninstalling version 0.2.0 of pathname gem solves the problem above. Therefore, I guess having two versions of pathname gems causes this behavior.</p>
<pre><code>gem uninstall pathname --version=0.2.0
</code></pre>
<ul>
<li>Start the Rack application again</li>
</ul>
<pre><code>bundle exec rackup -s webrick
</code></pre>
<ul>
<li>Output on the browser</li>
</ul>
<p>The expected output is obtained on the browser, without warning messages on the console.</p>
<pre><code>true true
</code></pre> Ruby master - Misc #18175 (Closed): Propose Jean Boussier (@byroot) as a core committerhttps://redmine.ruby-lang.org/issues/181752021-09-16T17:30:55Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<p>Hi,</p>
<p>I would like to propose adding Jean Boussier (<a class="user active user-mention" href="https://redmine.ruby-lang.org/users/7941">@byroot (Jean Boussier)</a>) as a committer. For years Jean has been doing great work with performance / memory optimizations, reporting and fixing bugs, as well as contributing features that really help real world applications. I think he would make a great addition to the team.</p>
<p>Just to highlight some of his contributions:</p>
<ul>
<li>Pushing <a href="https://bugs.ruby-lang.org/issues/17795" class="external">this <code>Process.fork</code></a> forward which is a continuation of <a href="https://bugs.ruby-lang.org/issues/5446" class="external">this 10 year old ticket</a>
</li>
<li>Adding API wrt GC timing <a href="https://bugs.ruby-lang.org/issues/10917" class="external">here</a>
</li>
<li>Providing easy repros for crashes <a href="https://bugs.ruby-lang.org/issues/17984" class="external">here</a>
</li>
<li>Doing cross project work among Ruby's built-in libraries to reduce memory usage:
<ul>
<li>See 2de594ca98d95e62f7fcf000f21e174ac3f6fcaf</li>
<li>And 71344a1d63038aa30328f91a180efb486ae4c19a</li>
<li>And <a href="https://bugs.ruby-lang.org/issues/18148" class="external">https://bugs.ruby-lang.org/issues/18148</a>
</li>
</ul>
</li>
</ul>
<p>Jean is great at sticking to things and seeing them through to completion, even if it takes an incredibly long time. I think his skills and determination would make a great asset for our team.</p>
<p>Thanks!</p> Ruby master - Bug #18169 (Closed): Local copies of gemified libraries are being released out of s...https://redmine.ruby-lang.org/issues/181692021-09-15T19:41:03Zheadius (Charles Nutter)headius@headius.com
<p>The CRuby codebase includes a number of libraries that have been gemified, more and more with each release. Unfortunately, these libraries are continually out of sync with both their home repositories and their released gems.</p>
<p>The problem lies in the fact that CRuby keeps a local copy of these libraries within the CRuby git repository, and allows committers to make changes either in the CRuby repository or in the gem's home repository. This has led to many releases of Ruby shipping code that <strong>does not correspond to any released version of the related gem</strong>.</p>
<p>I have filed several issues about this but the root cause has not been addressed:</p>
<ul>
<li><a href="https://github.com/ruby/ostruct/issues/11" class="external">https://github.com/ruby/ostruct/issues/11</a></li>
<li><a href="https://github.com/ruby/matrix/issues/12" class="external">https://github.com/ruby/matrix/issues/12</a></li>
<li><a href="https://github.com/ruby/prime/issues/11" class="external">https://github.com/ruby/prime/issues/11</a></li>
<li><a href="https://github.com/ruby/webrick/issues/48" class="external">https://github.com/ruby/webrick/issues/48</a></li>
<li><a href="https://github.com/ruby/rdoc/issues/835" class="external">https://github.com/ruby/rdoc/issues/835</a></li>
<li><a href="https://github.com/ruby/rexml/issues/79" class="external">https://github.com/ruby/rexml/issues/79</a></li>
<li><a href="https://github.com/ruby/fileutils/issues/59" class="external">https://github.com/ruby/fileutils/issues/59</a></li>
<li><a href="https://github.com/ruby/ostruct/issues/31" class="external">https://github.com/ruby/ostruct/issues/31</a></li>
</ul>
<p>If these gems are to live on their own as standalone libraries/gems then one of two things must happen:</p>
<ul>
<li>All changes to them must go into their repositories. This would be the cleanest option. CRuby would, like JRuby, source these libraries directly from released gems, and no copies of their sources would be versioned in the CRuby git repository.</li>
</ul>
<p>OR</p>
<ul>
<li>CRuby-local changes to these libraries must be prohibited from being released unless there is a corresponding gem release. This would require automated or manual auditing at release time, to ensure that the claimed gem version actually corresponds to the sources being shipped.</li>
</ul>
<p>In addition to making it impossible for external users of these gems to match CRuby releases, there are more serious implications:</p>
<ul>
<li>These hybrid intra-version changes to these libraries cannot be audited to a specific gem release. This could affect stability and security when users attempt to sync their local gem sets to the ones that shipped in a given version of Ruby.</li>
<li>Security fixes have gone out in CRuby releases but no corresponding x.x.y or x.x.x.y security release of the gem was released. This prevents users from fixing the security issue locally without either upgrading CRuby or also including new functionality changes (which may or may not work on the current version of Ruby).</li>
</ul>
<p>See the rexml issue above for one example of the security problem. Until the gem was released, it was not possible to install any gem version with the security fix without upgrading functionality elsewhere in rexml.</p>
<p>I believe it is time for CRuby to stop making changes to gemified libraries directly in the CRuby repository. These libraries have their own gems, repositories, and issue trackers, and that is where they should be maintained.</p> Ruby master - Feature #18159 (Closed): Integrate functionality of syntax_suggest gem into Rubyhttps://redmine.ruby-lang.org/issues/181592021-09-11T03:10:59Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<p>Missing 'end' errors are difficult to fix. We should integrate the functionality of the dead_end gem (<a href="https://github.com/zombocom/dead_end" class="external">https://github.com/zombocom/dead_end</a>) into Ruby similar to how we integrated did_you_mean. It would greatly help programming Ruby, in particular for beginners.</p>
<p>See also Ruby Kaigi Takeout 2021 talk by Richard Schneeman <a href="https://rubykaigi.org/2021-takeout/presentations/schneems.html" class="external">https://rubykaigi.org/2021-takeout/presentations/schneems.html</a>.</p> Ruby master - Feature #18068 (Closed): Silence LoadError only if it is for rubygems itselfhttps://redmine.ruby-lang.org/issues/180682021-08-08T14:21:27Zdaniel_niknam (Daniel Niknam)
<p><strong>Background</strong></p>
<p>The "Optionally load did_you_mean and RubyGems" PR (<a href="https://github.com/ruby/ruby/pull/2764" class="external">https://github.com/ruby/ruby/pull/2764</a>) attempted to prevent raising <code>LoadError</code> when requiring <code>rubygems</code> because it might not be available optionally when Ruby is delivered via packaging systems and instead prints a warning message.</p>
<p><strong>Context</strong></p>
<p>I was working on a feature in RubyGems to better communicate to users that something went wrong when loading <code>rubygems/defaults/operating_system</code> and after writing a test, I saw that any <code>LoadError</code> exception raised by the rubygems will be captured and a warning will be printed instead (<a href="https://github.com/rubygems/rubygems/pull/4824" class="external">https://github.com/rubygems/rubygems/pull/4824</a>). Although "Optionally load did_you_mean and RubyGems" PR intention was to prevent failure when <code>rubygems</code> are not available, it's capturing every <code>LoadError</code> that might happen inside the <code>rubygems</code> at runtime.</p>
<p><strong>Change</strong></p>
<p>I have created a PR: <a href="https://github.com/ruby/ruby/pull/4719" class="external">https://github.com/ruby/ruby/pull/4719</a><br>
Prevent raising the LoadError exception only if it's related directly to loading <code>rubygems</code></p>
<p><strong>Affected ruby versions</strong><br>
3.x</p> Ruby master - Misc #18017 (Closed): Broken links from Revision e86c1f6f to changed fileshttps://redmine.ruby-lang.org/issues/180172021-07-01T08:18:28Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<p>All the links at the bottom of<br>
<a href="https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c" class="external">https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c</a><br>
(to the changed files and diffs) produce "404<br>
The entry or revision was not found in the repository."</p>
<p>I'm not sure whether this is a singular or a systematic issue.</p> Ruby master - Feature #17873 (Closed): Update of default gems in Ruby 3.1https://redmine.ruby-lang.org/issues/178732021-05-20T10:45:25Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>I promoted many standard libraries to the default gems. You can see them at <a href="https://stdgems.org/#default-gems-ruby-301" class="external">https://stdgems.org/#default-gems-ruby-301</a></p>
<p>I propose the following libraries to promote the bundled gems from the default gems.</p>
<pre><code>matrix
prime
net/ftp
net/smtp
net/pop
net/imap
</code></pre>
<p>They have primary maintainer in the canonical repository in github. So, they can release the new version with their convenience.</p>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/12">@shugo (Shugo Maeda)</a> <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/182">@marcandre (Marc-Andre Lafortune)</a> Any thought?</p>
<p>And I also propose to extract the following libraries from the default gems.</p>
<pre><code>tracer
dbm
gdbm
</code></pre>
<p>They are no longer actively maintained and not widely used today.</p> Ruby master - Feature #17684 (Assigned): Remove `--disable-gems` from release version of Rubyhttps://redmine.ruby-lang.org/issues/176842021-03-10T12:51:46Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>In my understand, <code>--disable-gems</code> is only debugging feature for ruby-core team.</p>
<p>But some users enabled its option in test environment for performance or etc. So, <code>--disable-gems</code> option is wrong usage for some users.</p>
<ul>
<li><a href="https://github.com/rubygems/bundler/issues/7487#issuecomment-569901549" class="external">https://github.com/rubygems/bundler/issues/7487#issuecomment-569901549</a></li>
<li><a href="https://github.com/rubygems/rubygems/pull/4440#issue-587031184" class="external">https://github.com/rubygems/rubygems/pull/4440#issue-587031184</a></li>
</ul>
<p>We should remove it from package version of ruby.</p> Ruby master - Bug #17476 (Closed): 3.0/specifications/default/net-*.gemspec repeats the same fileshttps://redmine.ruby-lang.org/issues/174762020-12-27T01:28:19Zluizluca (Luiz Angelo Daros de Luca)luizluca@gmail.com
<p>I guess net-* generated gemspec during ruby build assumes that the net/ directory only contains its files (as it happens on standalone gem builds):</p>
<pre><code class="shell syntaxhl" data-language="shell">/usr/lib/ruby/gems/3.0/specifications/default/net-ftp-0.1.1.gemspec: s.files <span class="o">=</span> <span class="o">[</span><span class="s2">"net/ftp.rb"</span>.freeze, <span class="s2">"net/http.rb"</span>.freeze, <span class="s2">"net/http/backward.rb"</span>.freeze, <span class="s2">"net/http/exceptions.rb"</span>.freeze, <span class="s2">"net/http/generic_request.rb"</span>.freeze, <span class="s2">"net/http/header.rb"</span>.freeze, <span class="s2">"net/http/proxy_delta.rb"</span>.freeze, <span class="s2">"net/http/request.rb"</span>.freeze, <span class="s2">"net/http/requests.rb"</span>.freeze, <span class="s2">"net/http/response.rb"</span>.freeze, <span class="s2">"net/http/responses.rb"</span>.freeze, <span class="s2">"net/http/status.rb"</span>.freeze, <span class="s2">"net/https.rb"</span>.freeze, <span class="s2">"net/imap.rb"</span>.freeze, <span class="s2">"net/pop.rb"</span>.freeze, <span class="s2">"net/protocol.rb"</span>.freeze, <span class="s2">"net/smtp.rb"</span>.freeze]
/usr/lib/ruby/gems/3.0/specifications/default/net-http-0.1.1.gemspec: s.files <span class="o">=</span> <span class="o">[</span><span class="s2">"net/http.rb"</span>.freeze, <span class="s2">"net/http/backward.rb"</span>.freeze, <span class="s2">"net/http/exceptions.rb"</span>.freeze, <span class="s2">"net/http/generic_request.rb"</span>.freeze, <span class="s2">"net/http/header.rb"</span>.freeze, <span class="s2">"net/http/proxy_delta.rb"</span>.freeze, <span class="s2">"net/http/request.rb"</span>.freeze, <span class="s2">"net/http/requests.rb"</span>.freeze, <span class="s2">"net/http/response.rb"</span>.freeze, <span class="s2">"net/http/responses.rb"</span>.freeze, <span class="s2">"net/http/status.rb"</span>.freeze]
/usr/lib/ruby/gems/3.0/specifications/default/net-imap-0.1.1.gemspec: s.files <span class="o">=</span> <span class="o">[</span><span class="s2">"net/ftp.rb"</span>.freeze, <span class="s2">"net/http.rb"</span>.freeze, <span class="s2">"net/http/backward.rb"</span>.freeze, <span class="s2">"net/http/exceptions.rb"</span>.freeze, <span class="s2">"net/http/generic_request.rb"</span>.freeze, <span class="s2">"net/http/header.rb"</span>.freeze, <span class="s2">"net/http/proxy_delta.rb"</span>.freeze, <span class="s2">"net/http/request.rb"</span>.freeze, <span class="s2">"net/http/requests.rb"</span>.freeze, <span class="s2">"net/http/response.rb"</span>.freeze, <span class="s2">"net/http/responses.rb"</span>.freeze, <span class="s2">"net/http/status.rb"</span>.freeze, <span class="s2">"net/https.rb"</span>.freeze, <span class="s2">"net/imap.rb"</span>.freeze, <span class="s2">"net/pop.rb"</span>.freeze, <span class="s2">"net/protocol.rb"</span>.freeze, <span class="s2">"net/smtp.rb"</span>.freeze]
/usr/lib/ruby/gems/3.0/specifications/default/net-pop-0.1.1.gemspec: s.files <span class="o">=</span> <span class="o">[</span><span class="s2">"net/ftp.rb"</span>.freeze, <span class="s2">"net/http.rb"</span>.freeze, <span class="s2">"net/http/backward.rb"</span>.freeze, <span class="s2">"net/http/exceptions.rb"</span>.freeze, <span class="s2">"net/http/generic_request.rb"</span>.freeze, <span class="s2">"net/http/header.rb"</span>.freeze, <span class="s2">"net/http/proxy_delta.rb"</span>.freeze, <span class="s2">"net/http/request.rb"</span>.freeze, <span class="s2">"net/http/requests.rb"</span>.freeze, <span class="s2">"net/http/response.rb"</span>.freeze, <span class="s2">"net/http/responses.rb"</span>.freeze, <span class="s2">"net/http/status.rb"</span>.freeze, <span class="s2">"net/https.rb"</span>.freeze, <span class="s2">"net/imap.rb"</span>.freeze, <span class="s2">"net/pop.rb"</span>.freeze, <span class="s2">"net/protocol.rb"</span>.freeze, <span class="s2">"net/smtp.rb"</span>.freeze]
/usr/lib/ruby/gems/3.0/specifications/default/net-protocol-0.1.0.gemspec: s.files <span class="o">=</span> <span class="o">[</span><span class="s2">"net/ftp.rb"</span>.freeze, <span class="s2">"net/http.rb"</span>.freeze, <span class="s2">"net/http/backward.rb"</span>.freeze, <span class="s2">"net/http/exceptions.rb"</span>.freeze, <span class="s2">"net/http/generic_request.rb"</span>.freeze, <span class="s2">"net/http/header.rb"</span>.freeze, <span class="s2">"net/http/proxy_delta.rb"</span>.freeze, <span class="s2">"net/http/request.rb"</span>.freeze, <span class="s2">"net/http/requests.rb"</span>.freeze, <span class="s2">"net/http/response.rb"</span>.freeze, <span class="s2">"net/http/responses.rb"</span>.freeze, <span class="s2">"net/http/status.rb"</span>.freeze, <span class="s2">"net/https.rb"</span>.freeze, <span class="s2">"net/imap.rb"</span>.freeze, <span class="s2">"net/pop.rb"</span>.freeze, <span class="s2">"net/protocol.rb"</span>.freeze, <span class="s2">"net/smtp.rb"</span>.freeze]
/usr/lib/ruby/gems/3.0/specifications/default/net-smtp-0.2.1.gemspec: s.files <span class="o">=</span> <span class="o">[</span><span class="s2">"net/ftp.rb"</span>.freeze, <span class="s2">"net/http.rb"</span>.freeze, <span class="s2">"net/http/backward.rb"</span>.freeze, <span class="s2">"net/http/exceptions.rb"</span>.freeze, <span class="s2">"net/http/generic_request.rb"</span>.freeze, <span class="s2">"net/http/header.rb"</span>.freeze, <span class="s2">"net/http/proxy_delta.rb"</span>.freeze, <span class="s2">"net/http/request.rb"</span>.freeze, <span class="s2">"net/http/requests.rb"</span>.freeze, <span class="s2">"net/http/response.rb"</span>.freeze, <span class="s2">"net/http/responses.rb"</span>.freeze, <span class="s2">"net/http/status.rb"</span>.freeze, <span class="s2">"net/https.rb"</span>.freeze, <span class="s2">"net/imap.rb"</span>.freeze, <span class="s2">"net/pop.rb"</span>.freeze, <span class="s2">"net/protocol.rb"</span>.freeze, <span class="s2">"net/smtp.rb"</span>.freeze]
</code></pre> Ruby master - Feature #17303 (Closed): Remove webrick from stdlibhttps://redmine.ruby-lang.org/issues/173032020-11-02T11:13:08Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>I propose to move webrick to bundled gems or remove it from stdlib of ruby.</p>
<p>We have several vulnerability issues in webrick gem.</p>
<p><a href="https://www.ruby-lang.org/en/news/2020/09/29/http-request-smuggling-cve-2020-25613/" class="external">https://www.ruby-lang.org/en/news/2020/09/29/http-request-smuggling-cve-2020-25613/</a></p>
<p>The ruby core team don't have enough time to handle them. We should remove webrick from default gems at least.</p>
<p>Patch for this feature: <a href="https://github.com/ruby/ruby/pull/3729" class="external">https://github.com/ruby/ruby/pull/3729</a></p> Ruby master - Feature #17287 (Closed): Faster Pathname FileUtils methodshttps://redmine.ruby-lang.org/issues/172872020-10-26T18:33:36Zschneems (Richard Schneeman)
<p>I have a patch that I would like to merge into Pathname for increased performance. I understand that akr maintains pathname and may not be on GitHub. Here is a link to my patch:</p>
<p><a href="https://github.com/ruby/ruby/pull/3693" class="external">https://github.com/ruby/ruby/pull/3693</a></p>
<p>Here is the diff:</p>
<pre><code>$ git diff master
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index e6fb90277d..c3af24837f 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -575,12 +575,13 @@ def find(ignore_error: true) # :yield: pathname
class Pathname # * FileUtils *
+ autoload(:FileUtils, 'fileutils')
+
# Creates a full path, including any intermediate directories that don't yet
# exist.
#
# See FileUtils.mkpath and FileUtils.mkdir_p
def mkpath
- require 'fileutils'
FileUtils.mkpath(@path)
nil
end
@@ -591,7 +592,6 @@ def mkpath
def rmtree
# The name "rmtree" is borrowed from File::Path of Perl.
# File::Path provides "mkpath" and "rmtree".
- require 'fileutils'
FileUtils.rm_r(@path)
nil
end
</code></pre>
<a name="Description"></a>
<h2 >Description<a href="#Description" class="wiki-anchor">¶</a></h2>
<p>Currently when calling any of the "FileUtils" methods on pathname <code>require</code> is called every time even though that library might already be loaded. This is slow.</p>
<p>We can speed it up by either checking first if the constant is already defined, or by using autoload.</p>
<p>Using defined speeds up the action by about 300x and using autoload is about twice as fast as that (600x faster than current require method).</p>
<p>I'm proposing we use autoload:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="nb">require</span> <span class="s1">'benchmark/ips'</span>
<span class="no">Benchmark</span><span class="p">.</span><span class="nf">ips</span> <span class="k">do</span> <span class="o">|</span><span class="n">x</span><span class="o">|</span>
<span class="nb">autoload</span><span class="p">(</span><span class="ss">:FileUtils</span><span class="p">,</span> <span class="s2">"fileutils"</span><span class="p">)</span>
<span class="n">x</span><span class="p">.</span><span class="nf">report</span><span class="p">(</span><span class="s2">"require"</span><span class="p">)</span> <span class="p">{</span> <span class="nb">require</span> <span class="s1">'fileutils'</span> <span class="p">}</span>
<span class="n">x</span><span class="p">.</span><span class="nf">report</span><span class="p">(</span><span class="s2">"defined"</span><span class="p">)</span> <span class="p">{</span> <span class="nb">require</span> <span class="s1">'fileutils'</span> <span class="k">unless</span> <span class="k">defined?</span><span class="p">(</span><span class="no">FileUtils</span><span class="p">)</span> <span class="p">}</span>
<span class="n">x</span><span class="p">.</span><span class="nf">report</span><span class="p">(</span><span class="s2">"autoload"</span><span class="p">)</span> <span class="p">{</span> <span class="no">FileUtils</span> <span class="p">}</span>
<span class="n">x</span><span class="p">.</span><span class="nf">compare!</span>
<span class="k">end</span>
<span class="c1"># Warming up --------------------------------------</span>
<span class="c1"># require 3.624k i/100ms</span>
<span class="c1"># defined 1.465M i/100ms</span>
<span class="c1"># autoload 2.320M i/100ms</span>
<span class="c1"># Calculating -------------------------------------</span>
<span class="c1"># require 36.282k (± 2.4%) i/s - 184.824k in 5.097153s</span>
<span class="c1"># defined 14.539M (± 2.0%) i/s - 73.260M in 5.041161s</span>
<span class="c1"># autoload 23.100M (± 1.9%) i/s - 115.993M in 5.023271s</span>
<span class="c1"># Comparison:</span>
<span class="c1"># autoload: 23099779.2 i/s</span>
<span class="c1"># defined: 14538544.9 i/s - 1.59x (± 0.00) slower</span>
<span class="c1"># require: 36282.3 i/s - 636.67x (± 0.00) slower</span>
</code></pre>
<p>Because this autoload is scoped to Pathname it will not change the behavior of existing programs that are not expecting FileUtils to be loaded yet:</p>
<pre><code>ruby -rpathname -e "class Pathname; autoload(:FileUtils, 'fileutils'); end; puts FileUtils.exist?('foo')"
Traceback (most recent call last):
-e:1:in `<main>': uninitialized constant FileUtils (NameError)
</code></pre> Ruby master - Feature #17267 (Closed): Remove Win32API at Ruby 3.0https://redmine.ruby-lang.org/issues/172672020-10-19T23:58:55Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p><a href="https://github.com/ruby/ruby/blob/master/ext/win32/lib/Win32API.rb#L5" class="external">https://github.com/ruby/ruby/blob/master/ext/win32/lib/Win32API.rb#L5</a> says "Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead".</p>
<p>We have enough time to deprecate for this module.</p>
<p>Can we remove it from our repo?</p> Ruby master - Misc #17137 (Assigned): Cooperation on maintaining official docker ruby imageshttps://redmine.ruby-lang.org/issues/171372020-08-31T19:52:31Zdeivid (David Rodríguez)
<p>It was pointed out to me at <a href="https://github.com/docker-library/ruby/issues/323" class="external">https://github.com/docker-library/ruby/issues/323</a> that the ruby-core team has started maintaining their own docker images at <a href="https://github.com/ruby/ruby-docker-images" class="external">https://github.com/ruby/ruby-docker-images</a>, and that the base Dockerfiles were initially started from the official docker images.</p>
<p>The maintainers of the official images would be interesting in collaborating on maintaining these images. Maybe merging the projects would be a nice idea from an end user point of view. I'm guessing there's a reason why <a href="https://github.com/ruby/ruby-docker-images" class="external">https://github.com/ruby/ruby-docker-images</a> was started as a separate project, but maybe any improvements over the official project could be merged back. The obvious new feature that I see in the README is the ability to build development images of specific revisions.</p>
<p>Anyways, I mentioned the approach of the docker folks to hsbt and he told me to open a ticket here. So here it is!</p>
<p>Regards!</p> Ruby master - Misc #16980 (Closed): Improve documentation on JSON#parse and JSON#parse!https://redmine.ruby-lang.org/issues/169802020-06-23T18:04:34Zbruno.gomes (Bruno Gomes da Silva)
<p>Adds information about raised error when fails to parse on JSON#parse and JSON#parse!</p> Ruby master - Feature #16963 (Closed): Remove English.rb from Ruby 2.8/3.0https://redmine.ruby-lang.org/issues/169632020-06-16T12:40:33Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>English.rb is no longer maintained by ruby core team.</p>
<p>Can we remove it from our repository? The users can install if from rubygems.org now.</p> Ruby master - Bug #16951 (Closed): Consistently referer dependencieshttps://redmine.ruby-lang.org/issues/169512020-06-11T11:06:28Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>It seems that the default gems interdependencies in Ruby are mess. Years ago, when JSON was merged into StdLib, there was big movement and everybody dropped their references to JSON "because it is part of StdLib and therefore it is not needed". I always thought that removing the references was mistake.</p>
<p>Now, there are other interesting cases. Let me name two I know about:</p>
<ol>
<li>
<p>REXML is going to be removed from default gems in Ruby 2.8, so some packages already started to introduce the dependency explicitly <a href="https://github.com/gettalong/kramdown/commit/c1aa6ad98fab589050ab8e82897ec4b7a3850b89" class="external">1</a>. So once somebody uses Kramdown on older Ruby, the external REXML of whatever version is going to be used.</p>
</li>
<li>
<p>There are also gems in StdLib, such as IRB, which are specifying their dependencies in .gemspec file.</p>
</li>
</ol>
<p>This is unfortunately causing very inconsistent user experience, depending if RubyGems are enabled/disabled, if one is using Bundler or not, if somebody explicitly states something somewhere and what dependencies are transitively pulled in.</p>
<p>I would really appreciate, if Ruby upstream finally paid attention to this problem. My suggestion is that if some gem depends on some other gem, this dependency should be always explicitly stated in the .gemspec file. This would provide clear precedence and guideline to others. This would save all possible surprises and hidden issues, suddenly using dependency of different version, which is pulled in transitively.</p> Ruby master - Bug #16926 (Closed): Kernel#require does not load a feature twice when $LOAD_PATH h...https://redmine.ruby-lang.org/issues/169262020-05-31T15:55:36ZEregon (Benoit Daloze)
<p>This spec:<br>
<a href="https://github.com/ruby/spec/blob/03f9a0e2f9c23a12614ffb603f32cd971d79616e/core/kernel/shared/require.rb#L246-L251" class="external">https://github.com/ruby/spec/blob/03f9a0e2f9c23a12614ffb603f32cd971d79616e/core/kernel/shared/require.rb#L246-L251</a></p>
<p>fails in 2.7.1, but not on Ruby <= 2.6 and not on master.</p>
<p>Could someone investigate why that is and if the change is on purpose or a bug?<br>
It sounds like a bug, because changing the last <code>be_false</code> to <code>be_true</code> then passes for <code>Kernel#require</code> but fails for <code>Kernel.require</code>.</p>
<p>Reproduce with:</p>
<pre><code>$ Use ruby 2.7.1
$ cd ruby/spec
# remove ruby_bug guard in core/kernel/require_spec.rb
$ mspec core/kernel/require_spec.rb
</code></pre> Ruby master - Bug #16904 (Closed): rubygems: psych: superclass mismatch for class Mark (TypeError)https://redmine.ruby-lang.org/issues/169042020-05-20T14:09:47Zjaruga (Jun Aruga)
<p>Is it possible to backport the following commits into Ruby?</p>
<p>Remove explicit <code>psych</code> activation<br>
<a href="https://github.com/rubygems/rubygems/commit/1ccf0912a161d20e0c4a7b139fd76e8739a411ba" class="external">https://github.com/rubygems/rubygems/commit/1ccf0912a161d20e0c4a7b139fd76e8739a411ba</a></p>
<p>bundler: Remove explicit <code>psych</code> activation.<br>
<a href="https://github.com/rubygems/rubygems/commit/88478bb56945ffa9868491cacd0bc74d9d73c848" class="external">https://github.com/rubygems/rubygems/commit/88478bb56945ffa9868491cacd0bc74d9d73c848</a></p>
<p>It causes the following kind of error when psych is installed as not default gem but regular gem. It's a Fedora Ruby specific case. <strong>This is not the case of Ruby built from source normally.</strong></p>
<pre><code>$ cat test.rb
require 'psych'
Gem.load_yaml # <= The error happens.
</code></pre>
<pre><code>$ ruby test.rb
/usr/lib64/gems/ruby/psych-3.1.0/psych.so: warning: already initialized constant Psych::Parser::ANY
...
/usr/share/gems/gems/psych-3.1.0/lib/psych/parser.rb:34:in `<class:Parser>': superclass mismatch for class Mark (TypeError)
</code></pre>
<p>It is possibly also related to <a href="https://github.com/ruby/psych/issues/386" class="external">https://github.com/ruby/psych/issues/386</a> .</p>
<p>Thank you.</p> Ruby master - Misc #16778 (Rejected): Should we stop vendoring default gems code?https://redmine.ruby-lang.org/issues/167782020-04-11T13:26:39Zdeivid (David Rodríguez)
<p>Currently ruby-core vendors all the code in default gems, and runs the tests for each of them.</p>
<p>Also, ruby-core continuously updates the vendored code of default gems to sync with the upstream repos. That's overhead work, not only from syncronizing the code itself, but it also requires perfect syncronization of releases to avoid including versions of default gems that are different from released versions.</p>
<p>Also, this causes confusion for contributors because the code lives "duplicated" in two different places. Some times contributors will open a PR in the ruby-core repo, only to find out that they need to go to the upstream repo and contribute it in there. And this rule is not even always followed and sometimes ruby-core contributors apply patches to the vendored code directly (many times to fix test-only issues inherent to the different structure of the core repository). These patches then need to be contributed back to the upstream repo.</p>
<p>I believe that all of that kind of defeats the point of "gemification" of the standard library.</p>
<p>Once some ruby code its gemified, it should be the new upstream's responsability to make sure the code works and it's properly tested, and ruby-core should be free'd from that responsability.</p>
<p>Maybe ruby-core could do something along the following lines:</p>
<ul>
<li>Remove all the vendored code from default gems.</li>
<li>When this code is needed for internal tests, manage it as a development dependency, clone it as necessary on non source controlled locations, and use it from there.</li>
<li>Maybe a file similar to <code>gems/bundled_gems</code> can be added for default gems indicating their versions and upstream repos, to ease things.</li>
<li>Upon <code>make install</code>, clone the proper version of each default library and get it installed in the default $LOAD_PATH.</li>
<li>Maybe add some bare high level CI checks to ensure that all default libraries can be properly required after <code>make install</code>, and that their executables (if they include any) can also be run.</li>
</ul>
<p>This should bring several benefits to the development process:</p>
<ul>
<li>No more duplicated code.</li>
<li>No more syncronization from upstream to ruby-core.</li>
<li>No more syncronization from ruby-core to upstream.</li>
<li>No more confusion around the canonical place to contribute.</li>
<li>No more complexities derived from the different organization of the code depending on whether it lives in ruby-core or outside.</li>
</ul>
<p>I believe jruby already does something like this so it'd be interesting to get some input from them.</p>
<p>If this is a direction the ruby-core team would like to take, I'm happy to help <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/572">@hsbt (Hiroshi SHIBATA)</a> with small steps towards slowly approaching to this high level goal.</p> Ruby master - Misc #16671 (Closed): BASERUBY version policyhttps://redmine.ruby-lang.org/issues/166712020-03-04T06:40:36Zko1 (Koichi Sasada)
<p>Ruby 2.7 (MRI) requires Ruby 2.2 or later (== BASERUBY) to build from repository.<br>
Tarball does not need any installed Ruby.<br>
To build latest Ruby from repository, you need to build Ruby 2.2 and later from a tarball.</p>
<p>Can we make the BASERUBY version update policy?</p>
<a name="Background"></a>
<h1 >Background<a href="#Background" class="wiki-anchor">¶</a></h1>
<p>To use <code>ISeq#to_a</code> (specific format) Ruby 2.2 or later is needed from Ruby 2.7.<br>
The oldest version used by RubyCI machines was Ruby 2.2, so I determined update.<br>
I needed to file a ticket about this version bump, sorry.</p>
<hr>
<p>related: <a href="https://bugs.ruby-lang.org/issues/16668" class="external">https://bugs.ruby-lang.org/issues/16668</a></p> Ruby master - Feature #16657 (Assigned): Don't ship bundled gems as .gem files as well as in expa...https://redmine.ruby-lang.org/issues/166572020-02-27T06:50:02Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>Working at <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Extensions Do Not Compile on Mingw64 with mingw32-make (Closed)" href="https://redmine.ruby-lang.org/issues/16651">#16651</a>, I wonder why the release tarball ships with the bundled gem in form of .gem packages as well as the expanded sources. It would be nice, if one option is chosen. Ideally just the .gem packages, because these are vanilla upstream packages installable via RubyGems without rbinstall magic.</p> Ruby master - Feature #16652 (Closed): Use RubyGems facilities to install Gems during Ruby instal...https://redmine.ruby-lang.org/issues/166522020-02-24T17:10:44Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>Currently, <code>tools/rbinstall</code> uses quite some custom code to install gems instead of using functionality available in RubyGems. I don't think this is good, because the code is non transparent ATM and it is duplicating functionality, which is already available and tested in RubyGems. Also, it intoduces its own concepts such as <code>$script_mode</code> vs <code>$prog_mode</code>. So I opened two PRs, gradually implementing this.</p>
<p>The first PR <a href="https://github.com/ruby/ruby/pull/2515" class="external">1</a> uses <code>Gem::Package</code> like object and duck typing instead of monkey patching.</p>
<ol>
<li>This is similar to what RubyGems do and it is less magic <a href="https://github.com/rubygems/rubygems/blob/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L151" class="external">2</a>.</li>
<li>It avoids deprecated code paths in RubyGems <a href="https://github.com/rubygems/rubygems/blob/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L187" class="external">3</a>.</li>
</ol>
<p>The second PR <a href="https://github.com/ruby/ruby/pull/2545" class="external">4</a> builds on the top of the first one and uses <code>UnpackedInstaller</code> to install default gems (it would be probably nice to get <code>UnpackedInstaller</code> into RubyGems, but I am not sure how it could be invoked). As a bonus, it removes the pregenerated binstubs. These are now generated by <code>Gem::Installer</code> instead.</p> Ruby master - Misc #16512 (Assigned): Improving `www.ruby-lang.org` reference by merging with `ru...https://redmine.ruby-lang.org/issues/165122020-01-16T08:38:13Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/710">@zverok (Victor Shepelev)</a> prepared better-looking reference pages at <code>rubyreferences.github.io</code>. I think there's room for improvement of reference pages on <code>www.ruby-lang.org</code>. <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/572">@hsbt (Hiroshi SHIBATA)</a> Is there a chance to work with?</p>
<p>Matz.</p> Ruby master - Feature #16431 (Closed): Optionally load did_you_mean (and RubyGems)https://redmine.ruby-lang.org/issues/164312019-12-18T14:20:04Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>I just have opened PR <a href="https://github.com/ruby/ruby/pull/2764" class="external">1</a>, which allows Ruby to run when did_you_mean is not available. As I previously discussed in <a class="issue tracker-1 status-6 priority-4 priority-default closed" title="Bug: Revert did_you_mean promotion to default gem. (Rejected)" href="https://redmine.ruby-lang.org/issues/16427">#16427</a>, there are cases when speed, memory, disk or network bandwidth is a concern and did_you_mean is not useful for runtime. This is especially useful when Ruby is installed via packaging systems of (Linux) distributions.</p>
<p>The PR is split into 4 commits, because since I was there, I prepared similar changes to RubyGems.</p> Ruby master - Bug #16338 (Closed): gemspec stub EOF separators throw warninghttps://redmine.ruby-lang.org/issues/163382019-11-11T04:54:46ZMSP-Greg (Greg L)
<p>Some recent commits generate a warning when comments contain EOF characters, and any extension gems that create more than one *.so file have EOF characters in the stub portion of the gemspec. I noticed it with ruby-loco logs when json is loaded.</p>
<p>This may be intentional, but I hate seeing warning generated by files included with master. There are comments in RubyGems about it, but I didn't see a resolution.</p>
<p>Also, I didn't look thru the CI logs here, and often RubyGems is disabled. (?)</p>
<p>Please close if intentional...</p> Ruby master - Feature #16012 (Assigned): Add a (small) test-install suite?https://redmine.ruby-lang.org/issues/160122019-07-19T14:27:56ZMSP-Greg (Greg L)
<p>At various times there has been discussion about whether testing should require <code>make install</code>. Although I prefer to do testing using install (vs build), I see it as a choice, and not a requirement.</p>
<p>From time to time various issues have arisen that cannot be found with 'build' testing. Often, these issues cause CI test failure with master/trunk/ruby-head in external repos. Sometimes people blame 'Core', other times Travis, or rvm. Regardless, it doesn't look good.</p>
<p>So, might a small set of tests that check install functionality be added? It may need to be two separate (but equivalent) scripts. One for *nix, one for Windows.</p>
<p>In ruby-loco, I'm using a ps1 script to check that CLI bin files work. As soon as the update is pushed here, I'll add a test for nested bundler commands...</p> Ruby master - Bug #15856 (Closed): Performance of redundant `Kernel.require` is slow when many ge...https://redmine.ruby-lang.org/issues/158562019-05-16T17:16:49Zlamont (Lamont Granquist)lamont@scriptkiddie.org
<p>With many gems activated, performance of <code>Kernel.require</code> (renamed <code>Kernel.gem_original_require</code> after rubygems is loaded) is slow even when <code>require</code> has already been called (the redundant case).</p>
<p>This is likely because its string argument needs to be resolved to a pathname in order to be compared against a cache of already loaded paths shared between <code>require</code> and <code>require_relative</code>. But it becomes very expensive with lots of activated gems, particularly on windows, where <code>open</code>/<code>stat</code> is ten times more expensive than on linux.</p>
<p><code>require</code> (but not <code>require_relative</code>, which is already fast) probably needs another layer of redundancy checking that examines if the string argument exists as a <code>Hash</code> key (which I believe is the way <code>require</code> used to work before <code>require_relative</code> was introduced). The second time a <code>require</code> line is processed, it would find the value <code>true</code> and short circuit File I/O to resolve the filename. Of course on the first time, it would still need to resolve the argument to full path and maintain the cache so that <code>require</code> and <code>require_relative</code> are still redundant between them.</p>
<p>After testing, I don't think this would introduce any behavior changes since <code>require</code> lines should always be redundant. I thought it would fix some bugs, but I could not let the existing loader double-load a <code>require</code> line even though I tried to install and activate gems after requiring system libs. I couldn't find any bugs, though, which also means that this should be backward compatible.</p>
<p>An strace of the process of a single <code>require "openssl"</code> after it has been already required looks like this:</p>
<pre><code>open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/uuidtools-2.1.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-bin-15.0.276/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/public_suffix-3.0.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/addressable-2.6.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/mixlib-shellout-2.4.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/mixlib-cli-2.0.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/appbundler-0.12.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/bcrypt_pbkdf-1.0.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/bcrypt_pbkdf-1.0.1/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/debug_inspector-0.0.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/debug_inspector-0.0.3/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/binding_of_caller-0.8.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/binding_of_caller-0.8.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/builder-3.2.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/byebug-11.0.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/byebug-11.0.1/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tomlrb-1.2.8/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/mixlib-config-3.0.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/fuzzyurl-0.9.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-config-15.0.276/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/net-scp-2.0.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/erubis-2.7.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ffi-1.10.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.10.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/gssapi-1.3.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/gyoku-1.3.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/httpclient-2.8.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/little-plugger-1.1.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/multi_json-1.13.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/logging-2.2.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/nori-2.6.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rubyntlm-0.6.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/winrm-2.3.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rubyzip-1.2.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/winrm-fs-1.3.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/equatable-0.5.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tty-color-0.4.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/pastel-0.7.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tty-cursor-0.6.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/strings-ansi-0.1.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/unicode_utils-1.4.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/unicode-display_width-1.4.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/strings-0.1.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tty-box-0.3.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/necromancer-0.4.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/timers-4.3.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/wisper-2.0.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tty-screen-0.6.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tty-reader-0.5.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tty-prompt-0.18.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/license-acceptance-1.0.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/mixlib-log-3.0.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/mixlib-authentication-2.1.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/mixlib-archive-1.0.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/systemu-2.6.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/libyajl2-1.2.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/libyajl2-1.2.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ffi-yajl-2.3.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/ffi-yajl-2.3.1/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/plist-3.5.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ipaddress-0.8.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/wmi-lite-1.0.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ohai-15.0.34/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-gateway-2.0.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-multi-1.2.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/net-sftp-2.1.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ed25519-1.2.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/ed25519-1.2.4/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/highline-1.7.10/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/diff-lcs-1.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ffi-libarchive-0.4.6/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/hashie-3.6.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/uuidtools-2.1.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-zero-14.0.12/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/iniparse-1.4.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/syslog-logger-1.6.8/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/proxifier-1.0.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.276/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-bin-15.0.276/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-vault-3.4.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/cheffish-14.0.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/coderay-1.1.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/safe_yaml-1.0.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/crack-0.4.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/docile-1.3.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/multipart-post-2.0.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/faraday-0.15.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/faraday_middleware-0.12.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/hashdiff-0.3.9/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/htmlentities-4.3.4/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/method_source-0.9.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rspec-support-3.8.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rspec-core-3.8.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rspec-expectations-3.8.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rspec-mocks-3.8.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rspec-3.8.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rspec-its-1.3.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/pry-0.12.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/sslshake-1.3.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/parallel-1.17.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/parslet-1.8.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/semverse-3.0.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tty-table-0.10.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/tins-1.20.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/term-ansicolor-1.7.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/inspec-core-4.3.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/json-2.2.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/json-2.2.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/pry-byebug-3.7.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/slop-3.6.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/pry-remote-0.1.8/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/pry-stack_explorer-0.4.9.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rb-readline-0.5.5/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/rspec_junit_formatter-0.2.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ruby-prof-0.17.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/ruby-prof-0.17.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ruby-shadow-2.5.0/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/ruby-shadow-2.5.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/simplecov-html-0.10.2/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/simplecov-0.16.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/webmock-3.5.1/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/site_ruby/2.6.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/site_ruby/2.6.0/x86_64-linux/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/site_ruby/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/vendor_ruby/2.6.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/vendor_ruby/2.6.0/x86_64-linux/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/vendor_ruby/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/chef/embedded/lib/ruby/2.6.0/openssl.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = 7
</code></pre>
<p>On windows, this much I/O on every single <code>require</code> line can quickly add up to 100,000s of open calls, which takes several seconds on an SSD or up to a minute on a spinning drive just to evaluate the requires of an application that does no work (i.e. command line tooling).</p> Ruby master - Feature #15657 (Closed): Make webrick to bundled gemshttps://redmine.ruby-lang.org/issues/156572019-03-11T12:12:12Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>The maintenance of webrick is hard for the ruby core team because we should handle a lot of security issues in the future.</p>
<p>webrick was promoted the default gems in Ruby 2.5. It's a good time to promote the bundled gems from default gems before Ruby 3.0 release.</p> Ruby master - Feature #15541 (Third Party's Issue): Add alias symbolize_keys for symbolize_names ...https://redmine.ruby-lang.org/issues/155412019-01-16T01:44:56Zbaweaver (Brandon Weaver)keystonelemur@gmail.com
<p><a href="https://github.com/ruby/psych/issues/341" class="external">https://github.com/ruby/psych/issues/341</a></p>
<p>When trying to symbolize keys on JSON parsing, it's really hard to remember the name <code>symbolize_names</code>:</p>
<pre><code>JSON.parse(data, symbolize_names: true)
</code></pre>
<p>I would like to propose that we change this keyword to <code>symbolize_keys</code> to be more clear:</p>
<pre><code>JSON.parse(data, symbolize_keys: true)
</code></pre>
<p>The documentation for this method also reflects the confusion: <a href="http://ruby-doc.org/stdlib-2.6/libdoc/json/rdoc/JSON.html#method-i-parse-21" class="external">http://ruby-doc.org/stdlib-2.6/libdoc/json/rdoc/JSON.html#method-i-parse-21</a></p>
<pre><code>symbolize_names: If set to true, returns symbols for the names (keys) in a JSON object. Otherwise strings are returned. Strings are the default.
</code></pre>
<p>The same issue came up in Psych not too long ago:</p>
<p><a href="https://github.com/ruby/psych/issues/341" class="external">https://github.com/ruby/psych/issues/341</a></p>
<p>I believe the current name causes confusion. Would it be possible to add an alias to this keyword for clarity?</p> Ruby master - Bug #14679 (Closed): StdLib gems should properly specify their dependencieshttps://redmine.ruby-lang.org/issues/146792018-04-11T11:50:23Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>Could you please properly specify gem dependencies for gems included in StdLib? The current situation is unfortunate.</p>
<p>Let me give you hypothetical example. Lets say there is RDoc 7.x under development and it will depend on JSON 3.x library. Unfortunately, both of the libraries are breaking their API. However, latest version of Ruby ships with older version of the bundled gems, e.g. RDoc 6.x and JSON 2.x. Now if I like to use the new RDoc 7.x in my application, I put it into my Gemfile. But that immediately means my whole application is going to use the RDoc 7.x and JSON 3.x, possibly breaking the rest of the StdLib, which still depends on JSON 2.x or RDoc 6.x, since the dependencies are just assumed, but not specified. OTOH, if there were the dependencies properly specified, I would be notified by Bundler that these versions are incompatible and I should not use them together.</p>
<p>If the dependencies are not specified, I don't think that any of the bundled gems can be safely updated via "gem update" and therefore the benefits of gemified StdLib are completely gone, adding just maintenance burden, nothing more.</p> Ruby master - Bug #14409 (Closed): インストール手順の改善https://redmine.ruby-lang.org/issues/144092018-01-27T06:22:37ZReetok (Reetok Nino)
<p>以下の2つのインストール手順の部分を改善した方が良いと思いました。</p>
<ol>
<li>
<code>./configure</code>の生成に必要なautoconfのバージョンを指定するべき
<ul>
<li>2.68以降</li>
</ul>
</li>
<li>config.hとMakefileの生成に必要なRubyのバージョンを指定するべき
<ul>
<li>少なくともto_pathが実装されているバージョン</li>
</ul>
</li>
</ol>
<a name="環境"></a>
<h2 >環境<a href="#環境" class="wiki-anchor">¶</a></h2>
<pre><code>$ cat /etc/redhat-release
CentOS release 6.8 (Final)
$ uname -a
Linux kogeki 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>
<a name="configureの生成に必要なautoconfのバージョン"></a>
<h1 >./configureの生成に必要なautoconfのバージョン<a href="#configureの生成に必要なautoconfのバージョン" class="wiki-anchor">¶</a></h1>
<p><a href="https://github.com/ruby/ruby/blob/trunk/README.md" class="external">README.md</a>のHow to compile and installの 2つ目の手順にて autoconf を実行したところ、以下のエラーが発生しました。</p>
<pre><code>
$ autoconf
configure.ac:7: error: Autoconf version 2.67 or higher is required
configure.ac:7: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
</code></pre>
<p>2.67以上にのみ対応しているということだったので,<a href="http://ask.xmodulo.com/upgrade-autoconf-centos.html" class="external">このサイト</a>を参考に,2.68を導入したところ,./configureが正常終了しました。<br>
以上より,autoconfのバージョンを指定すべきだと考えます。</p>
<a name="confighとMakefileの生成に必要なRubyのバージョン"></a>
<h2 >config.hとMakefileの生成に必要なRubyのバージョン<a href="#confighとMakefileの生成に必要なRubyのバージョン" class="wiki-anchor">¶</a></h2>
<p><a href="https://github.com/ruby/ruby/blob/trunk/README.md" class="external">README.md</a>の<code>How to compile and install</code>の3つめの手順にて,以下のエラーが発生しました。</p>
<pre><code>$ ./configure
checking for ruby... false
configure: error: cannot run /bin/sh tool/config.sub
</code></pre>
<p>rubyが必要だったということで,<code>sudo yum install ruby</code>でrubyを入れ,再度実行したところNoMethodError'to_path'が発生しました。<br>
to_pathが実装されているRuby(2.4.3)を使用したところ,成功しました。<br>
以上より,config.hとMakefileの生成に必要なrubyのバージョンを指定すべきだと考えます。</p> Ruby master - Bug #14096 (Closed): Psych allows invalid single quote escape characterhttps://redmine.ruby-lang.org/issues/140962017-11-10T04:13:42Zheadius (Charles Nutter)headius@headius.com
<p>In <a href="https://github.com/jruby/jruby/issues/4847" class="external">https://github.com/jruby/jruby/issues/4847</a> (and previously in <a href="https://github.com/jruby/jruby/issues/2199" class="external">https://github.com/jruby/jruby/issues/2199</a>) we have had users report that escaped single quotes within a YAML string do not parse in JRuby, although they parse in MRI.</p>
<p>According to the YAML specs (both 1.1 and 1.2), <code>\\'</code> is <em>not</em> a valid escape character. The YAML library we use, SnakeYAML, has pushed back on adding it since it is not part of the spec.</p>
<p>Why does MRI parse this invalid YAML?</p>
<pre><code class="yaml syntaxhl" data-language="yaml"><span class="nn">---</span>
<span class="kt">!!seq</span> <span class="pi">[</span>
<span class="kt">!!str</span> <span class="s2">"</span><span class="s">https://www.youtube.com/watch?v=DzpKasJJtRs"</span><span class="pi">,</span>
<span class="kt">!!str</span> <span class="s2">"</span><span class="s">2Pac</span><span class="nv"> </span><span class="s">-</span><span class="nv"> </span><span class="s">Dont</span><span class="nv"> </span><span class="s">Care</span><span class="nv"> </span><span class="s">What</span><span class="nv"> </span><span class="s">Ya</span><span class="err">\</span><span class="s">'ll</span><span class="nv"> </span><span class="s">Think</span><span class="nv"> </span><span class="s">Remix</span><span class="nv"> </span><span class="s">Music</span><span class="nv"> </span><span class="s">Video</span><span class="nv"> </span><span class="s">2017"</span><span class="pi">,</span>
<span class="pi">]</span>
</code></pre> Ruby master - Bug #13918 (Closed): Appveyor failure - svn 59961 Use https instead of ftp for libf...https://redmine.ruby-lang.org/issues/139182017-09-19T03:20:23ZMSP-Greg (Greg L)
<p>See <a href="https://github.com/ruby/ruby/pull/1702" class="external">PR 1702</a>.</p>
<p>Builds previous to 2.4 don't have cert files, hence, can't verify.</p>
<p>See <a href="https://ci.appveyor.com/project/MSP-Greg/appveyor-ruby" class="external">Appveyor Ruby & MinGW detail</a>, which has ruby info on 1.9 thru trunk (after package list)...</p> Ruby master - Feature #13847 (Assigned): Gem activated problem for default gemshttps://redmine.ruby-lang.org/issues/138472017-08-29T08:53:45Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>If you try to use some default gems with a fixed version using Bundler, there are cases where the current RubyGems/Bundler/Ruby specification can not be used with the version specified by the user.</p>
<p>For example</p>
<pre><code>$ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin17]
$ gem list | grep openssl
openssl (2.0.5, 2.0.4, default: 2.0.3)
</code></pre>
<p>In the environment such as <code>require 'openssl'</code>, the version that is activated when openssl is searched with openssl is the version found first, ie 2.0.5.</p>
<pre><code>$ ruby -ropenssl -e 'p OpenSSL::VERSION'
"2.0.5"
</code></pre>
<p>At this time, for example, suppose the user really wants to use openssl 2.0.4 and wrote the following Gemfile.</p>
<pre><code>> cat Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
gem 'openssl', '2.0.4'
</code></pre>
<p>Unfortunately, since rubygems has required openssl before the bundler runs it will result in an activated error like this:</p>
<pre><code>> bundle exec ruby -ropenssl -e 'p OpenSSL::VERSION'
/path/to/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:317:in `check_for_activated_spec!': You have already activated openssl 2.0.5, but your Gemfile requires openssl 2.0.4. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
</code></pre>
<p>This problem can be avoided by bundling it as a vendoring library under bundler's repository if it is a default gem implemented with pure ruby.</p>
<p><a href="Https://github.com/bundler/bundler/blob/master/lib/bundler/vendor/fileutils/lib/fileutils.rb" class="external">Https://github.com/bundler/bundler/blob/master/lib/bundler/vendor/fileutils/lib/fileutils.rb</a></p>
<p>In the case of bundler, by separating the namespace as <code>Bundler::FileUtils</code>, even the version specified by the user is made available without conflict at the time of activate. However, this method can not be used with C extension library.</p>
<p>Since we want to use json/psych from the bundler team with rubygems/bundler to serialize data, we need about whether we can implement a way to avoid some kind of C extension on Ruby itself.</p>
<p>I discussed with <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/7068">@indirect (André Arko)</a> who is maintainer of RubyGems/Bundler. We can resolve this problem like following feature of ruby.</p>
<pre><code>require_for_bundler 'json', '2.0.2'
</code></pre>
<p>When we declared above <code>require_for_bundler</code>, We put a json-2.0.2 to placed in a namespace like <code>Bundler::JSON</code>. There were similar issues in the past as well.</p>
<p><a href="https://bugs.ruby-lang.org/issues/10320" class="external">https://bugs.ruby-lang.org/issues/10320</a></p>
<p>I think that the way of writing <code>require 'json', version: '2.0.2', into: :Bundler</code> which extended the method like this issue seems like that. Also, in this use case, it seems to be enough to use <code>require 'json', version: :default, into: :Bundler</code> which forces the use of default gem.</p>
<p>Matz, How do you think about this feature?</p> Ruby master - Feature #13653 (Closed): Bundled zlib helperhttps://redmine.ruby-lang.org/issues/136532017-06-13T12:01:47Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>I created experimentally implementation for zlib-binding helper of bundled build.</p>
<ul>
<li><a href="https://github.com/ruby/ruby/pull/1638" class="external">https://github.com/ruby/ruby/pull/1638</a></li>
<li><a href="https://patch-diff.githubusercontent.com/raw/ruby/ruby/pull/1638.patch" class="external">https://patch-diff.githubusercontent.com/raw/ruby/ruby/pull/1638.patch</a></li>
</ul>
<p>I also maintain ruby-build that is multi-platform build wrapper for ruby. I often got build failure<br>
report caused to missing zlib headers. examples are here.</p>
<ul>
<li><a href="https://github.com/rbenv/ruby-build/issues/832" class="external">https://github.com/rbenv/ruby-build/issues/832</a></li>
<li><a href="https://github.com/rbenv/ruby-build/issues/780" class="external">https://github.com/rbenv/ruby-build/issues/780</a></li>
</ul>
<p>I hope to resolve this situation for ruby users.</p>
<p>my patch make to build zlib-binding with bundled zlib sources. It only enabled when It was given<br>
<code>--enable-bundled-zlib</code> option with <code>configure</code> phase.</p> Ruby master - Feature #13534 (Closed): Checking installation results of default gemshttps://redmine.ruby-lang.org/issues/135342017-05-02T02:44:33Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<p>It's a reminder.</p>
<p>I merged rubygems-2.6.12 at r58530. But it backports was removed <code>test_realworld_default_gem</code> from original release.<br>
Because <code>test_realworld_default_gem</code> verifies installation results of default gems. So ruby test suite is not supported after <code>make install</code> environment.</p>
<p>Therefore, We should add test suite of <code>tool/rbinstall.rb</code>for default gems/bundled gems/rdoc etc.</p> Ruby master - Feature #13221 (Closed): [PATCH] gems/bundled_gems: add "curses" RubyGemhttps://redmine.ruby-lang.org/issues/132212017-02-17T00:31:22Znormalperson (Eric Wong)normalperson@yhbt.net
<p>This was part of the standard library in Ruby 2.0 and earlier;<br>
and some users may still expect it to be in the standard<br>
install.</p> Ruby master - Bug #10919 (Third Party's Issue): [gem install] installs multipe platformshttps://redmine.ruby-lang.org/issues/109192015-02-28T17:44:23Zabaumgaertner (Andreas Baumgaertner)andreas.baumgaertner@tisco.at
<p>Natively build a gem - just an example mysql2 on windows x64-mingw32<br>
I could only get the gem to compile with devkit when --platform=ruby is specified - so my understanding is that all devkit compiled gems are platform ruby, even if devkit platform is acutally x64-mingw32</p>
<pre><code>C:\apps\redmine_dev\bin>gem install mysql2 --no-document --platform=ruby -- "--with-mysql-dir=c:/apps/redmine_dev/mysql-5.6.23-winx64"
Fetching: mysql2-0.3.18.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-dir=c:/apps/redmine_dev/mysql-5.6.23-winx64'
This could take a while...
Successfully installed mysql2-0.3.18
1 gem installed
</code></pre>
<p>here comes the acutal issue:<br>
rerun (also with other dependency managers e.g. bundle install) installs dupplicate gem for platform x64-mingw32</p>
<pre><code>C:\apps\redmine_dev\bin>gem install mysql2
Fetching: mysql2-0.3.18-x64-mingw32.gem (100%)
======================================================================================================
\ You've installed the binary version of mysql2.
It was built using MySQL Connector/C version 6.1.5.
It's recommended to use the exact same version to avoid potential issues.
At the time of building this gem, the necessary DLL files were retrieved from:
http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.5-winx64.zip
\ This gem *includes* vendor/libmysql.dll with redistribution notice in vendor/README.
======================================================================================================
Successfully installed mysql2-0.3.18-x64-mingw32
Parsing documentation for mysql2-0.3.18-x64-mingw32
Installing ri documentation for mysql2-0.3.18-x64-mingw32
Done installing documentation for mysql2 after 0 seconds
1 gem installed
</code></pre>
<p>what is the point in installing a gem for two platforms?<br>
it is also not supported by require to specify a platform.</p>
<p>solution a:<br>
gem install should not install an additional platform, if the gem is already present<br>
gem list should always display the platform (not only if there are more than 1)</p>
<p>solution b:<br>
add an option to gem install that forces devkit build for specific platform so gem install will recognize that the platform is already present.</p>
<pre><code>C:\apps\redmine_dev\bin>gem list
*** LOCAL GEMS ***
bundler (1.8.3)
mysql2 (0.3.18 ruby x64-mingw32)
</code></pre>
<pre><code>C:\apps\redmine_dev\bin>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.5
- RUBY VERSION: 2.2.1 (2015-02-26 patchlevel 85) [x64-mingw32]
- INSTALLATION DIRECTORY: C:/apps/redmine_dev/ruby/lib/ruby/gems/2.2.0
- RUBY EXECUTABLE: C:/apps/redmine_dev/ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/apps/redmine_dev/ruby/bin
- SPEC CACHE DIRECTORY: C:/Users/abaumgaertner/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
- RUBYGEMS PLATFORMS:
- ruby
- x64-mingw32
- GEM PATHS:
- C:/apps/redmine_dev/ruby/lib/ruby/gems/2.2.0
- C:/Users/abaumgaertner/.gem/ruby/2.2.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- C:\apps\redmine_dev\ruby\bin
- C:\apps\redmine_dev\libs
- C:\apps\redmine_dev\ImageMagick
- D:\apps\mercurial_dev
- d:\msys64\mingw64\bin
- d:\msys64\mingw64\lib
- d:\msys64\usr\bin
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\Windows\System32\WindowsPowerShell\v1.0\
</code></pre> Ruby master - Feature #10833 (Third Party's Issue): getting argument error in rails productionhttps://redmine.ruby-lang.org/issues/108332015-02-06T12:05:27Zraja (narasinga raja)raja.narasinga2@gmail.com
<ol>
<li>I deployed my rails application using passenger + nginx<br>
2.data base is postgresql</li>
<li>when i am creating a new issue its showing Sorry, the page you are looking for is currently unavailable.<br>
Please try again later.<br>
plz help me out to get out of this problen</li>
</ol>
<p>4.in my nginx error log goy this error "App 22249 stderr: [ 2015-02-06 14:20:36.5094 22323/0x0000000690c1c0(Worker 1) utils.rb:72 ]: *** Exception ArgumentError in Rack application object (could not find a temporary directory) (process 22323, thread 0x0000000690c1c0(Worker 1)):"</p> Ruby master - Bug #10213 (Feedback): bundled gems ignored by make installhttps://redmine.ruby-lang.org/issues/102132014-09-08T06:42:15ZHanmac (Hans Mackowiak)hanmac@gmx.de
<p>i am often working with ruby trunk, and then i notice that<br>
"sudo make install" does ignore the gems that got moved from<br>
"defs/default_gems" to "gems/bundled_gems"</p>
<p>means gems listed in "gems/bundled_gems" toally got ignored and might missing later</p> Ruby master - Bug #9366 (Feedback): "make -j32 check TESTS=-j32" occasionally fails on rubygems/s...https://redmine.ruby-lang.org/issues/93662014-01-06T15:59:12Znormalperson (Eric Wong)normalperson@yhbt.net
<p>This only happens occasionally, maybe 1 out of 10 times during "make check",<br>
so it's probably a bug somewhere with GC.</p>
<p>I'll try to reproduce without parallel tests (could take a while).<br>
It seems to reproduce more easily on slower machine.<br>
I initially thought it was a bug in cachelined, but I can also reproduce it with plain trunk.</p>
<p>/home/ew/ruby/lib/rubygems/specification.rb:748:in <code>block in _resort!': undefined method </code>name' for nil:NilClass (NoMethodError)<br>
/home/ew/ruby/lib/rubygems/specification.rb:747:in <code>sort!' /home/ew/ruby/lib/rubygems/specification.rb:747:in </code>_resort!'<br>
/home/ew/ruby/lib/rubygems/specification.rb:699:in <code>_all' /home/ew/ruby/lib/rubygems/specification.rb:882:in </code>each'<br>
/home/ew/ruby/lib/rubygems/dependency.rb:284:in <code>find_all' /home/ew/ruby/lib/rubygems/dependency.rb:284:in </code>to_specs'<br>
/home/ew/ruby/lib/rubygems/dependency.rb:309:in <code>to_spec' /home/ew/ruby/lib/rubygems/core_ext/kernel_gem.rb:53:in </code>gem'<br>
/home/ew/ruby/lib/rubygems/package_task.rb:25:in <code><top (required)>' /home/ew/ruby/lib/rubygems/core_ext/kernel_require.rb:55:in </code>require'<br>
/home/ew/ruby/lib/rubygems/core_ext/kernel_require.rb:55:in <code>require' /home/ew/ruby/test/rubygems/test_gem_package_task.rb:3:in </code><top (required)>'<br>
/home/ew/ruby/lib/rubygems/core_ext/kernel_require.rb:55:in <code>require' /home/ew/ruby/lib/rubygems/core_ext/kernel_require.rb:55:in </code>require'<br>
/home/ew/ruby/lib/test/unit/parallel.rb:114:in <code>run' /home/ew/ruby/lib/test/unit/parallel.rb:183:in </code>'</p>
<p>Some worker was crashed. It seems ruby interpreter's bug<br>
or, a bug of test/unit/parallel.rb. try again without -j<br>
option.</p> Ruby master - Bug #8836 (Closed): [BUG] Bus Error with bundler on large Gemfile when resolving de...https://redmine.ruby-lang.org/issues/88362013-08-30T22:13:51Zdammer (Damir Sharipov)dammer2k@gmail.com
<p>ruby -v<br>
ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux]</p>
<p>rbenv -v<br>
rbenv 0.4.0-49-g8b04303</p>
<p>bundle --version<br>
Bundler version 1.3.5</p>
<p>gem -v<br>
2.0.3</p>
<p>To reproduce run bundle install in test folder</p>
<p>Also i have other crashes on work project on bundle update something<br>
<a href="https://gist.github.com/dammer/6376260" class="external">https://gist.github.com/dammer/6376260</a><br>
<a href="https://gist.github.com/dammer/6376174" class="external">https://gist.github.com/dammer/6376174</a></p> Ruby master - Feature #6590 (Third Party's Issue): Dealing with bigdecimal, etc gems in JRubyhttps://redmine.ruby-lang.org/issues/65902012-06-14T13:21:14Zheadius (Charles Nutter)headius@headius.com
<p>Hello!</p>
<p><a href="http://jira.codehaus.org/browse/JRUBY-6704" class="external">http://jira.codehaus.org/browse/JRUBY-6704</a></p>
<p>We have a need to make the "bigdecimal" gem work for JRuby, so that<br>
distros (like Red Hat, mentioned in the above bug) and users can have<br>
the same gemspec for JRuby with updated bigdecimal gem references.</p>
<p>I'm not sure the best way to proceed.</p>
<p>The bigdecimal source and gemspec all come from MRI source, and are<br>
not versioned separately. That means we can't simply share a<br>
repository for the JRuby bits. We could maintain a forked version in<br>
our forked "jruby/ruby" repository, but that wouldn't be part of the<br>
bigdecimal release cycle then.</p>
<p>So I'm looking to you for guidance.</p>
<p>The BigDecimal lib is here in JRuby:<br>
<a href="https://github.com/jruby/jruby/tree/master/src/org/jruby/ext/bigdecimal" class="external">https://github.com/jruby/jruby/tree/master/src/org/jruby/ext/bigdecimal</a></p>
<p>It might be simplest if for now there's a dummy "bigdecimal" gem<br>
pushed for JRuby that does not contain anything, since we would have<br>
other complications if we tried to remove BigDecimal from JRuby proper<br>
(it is referenced elsewhere int eh code, etc).</p>
<p>Thoughts?</p>
<ul>
<li>Charlie</li>
</ul> Ruby master - Bug #6124 (Closed): remove the "spec-only gems" in Ruby 1.9.3 (was What is the purp...https://redmine.ruby-lang.org/issues/61242012-03-07T22:50:50Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<p>As I tried to point out in <a class="issue tracker-1 status-6 priority-4 priority-default closed" title="Bug: Properly gemify BigDecimal (Rejected)" href="https://redmine.ruby-lang.org/issues/6123">#6123</a>, the "fake" gems which are distributed with Ruby breaks user's expectations. The following example should fail:</p>
<p>$ ruby --disable-gems -e "puts require('bigdecimal')"<br>
true</p>
<p>However, it is not failing. Could you please enlighten me what is the purpose of fake gem then? Even if you install updated BigDecimal from rubygems.org, the bundled version will won unless you use "gem 'bidgecimal'" somewhere in the code. This makes no sense.</p>
<p>Don't take me wrong, I am big fan of gemified stdlib <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Gemifying Ruby standard library (Closed)" href="https://redmine.ruby-lang.org/issues/5481">#5481</a>, however this is not the way how it should be done.</p> Ruby master - Feature #5481 (Closed): Gemifying Ruby standard libraryhttps://redmine.ruby-lang.org/issues/54812011-10-25T06:44:19Znahi (Hiroshi Nakamura)nakahiro@gmail.com
<p>=begin</p>
<p>Up-to-date summary of this proposal is at ((<a href="URL:https://bugs.ruby-lang.org/projects/ruby/wiki/StdlibGem" class="external">URL:https://bugs.ruby-lang.org/projects/ruby/wiki/StdlibGem</a>))</p>
<p>== Motivation</p>
<ul>
<li>ruby's release cycle is slow for some standard libraries;
<ul>
<li>ex. security fix for WEBrick, xmlrpc and Zlib.</li>
<li>ex. API iteration for net/http, OpenSSL, json, psych, RDoc, minitest and rake.</li>
</ul>
</li>
<li>There's already the feature called 'default gems' in ruby and some stdlibs are already using it:
<ul>
<li>rake, rdoc, minitest, json, io-console, bigdecimal</li>
<li>And some gems are already doing out-of-band releases.</li>
</ul>
</li>
<li>When releasing we should give independence equally to all stdlibs, but in a consistent and controllable way.</li>
</ul>
<p>== Proposal</p>
<ul>
<li>Allow out-of-band stdlib releases.
<ul>
<li>We are not proposing changes to ruby's release management, the release manager would decide when they release ruby and stdlib.</li>
</ul>
</li>
<li>Allow more stdlibs to be installed as a 'default gem'</li>
<li>Register these gems on RubyGems.org
<ul>
<li>Introduce a new mechanism: controlling supported ruby version so that we can avoid installing unexpected version of stdlib gems.<br>
For example, a WEBrick gem for ruby 2.0.1 (released from ruby_2_0_1 branch) should not be installed for ruby 2.0.0 (released from ruby_2_0_0 branch) unless we know it works for both 2.0.0 and 2.0.1.</li>
</ul>
</li>
</ul>
<p>Note:</p>
<ul>
<li>Moving stdlibs repository location is not a target of this proposal. The implementation details of stdlib gems should hide this from ruby committers.</li>
<li>ruby_1_9_3 is not a target of this proposal. The change should be introduced from 2.0.0 release.</li>
</ul>
<p>...Some more details of the proposal and discussion topics are going to follow as comments.<br>
=end</p>