Project

General

Profile

Actions

Bug #19158

closed

Ruby 3.1.3 installs wrong gemspec for debug gem

Added by deivid (David Rodríguez) almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
[ruby-core:111053]

Description

A pristine installation of Ruby 3.1.3 shows an installed debug-1.6.3.gemspec file that claims that debug-1.6.3 has no dependencies. This is incorrect, and causes issues for Bundler as reported at https://github.com/rubygems/rubygems/issues/6082.

An issue workaround is to manually reinstall the gem with gem install debug:1.6.3. That will reinstall the gem, including a correct gemspec file.

This is the file diff before and after reinstalling the gem

--- old.gemspec	2022-11-29 13:54:36
+++ /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
@@ -24,4 +24,16 @@
   s.summary = "Debugging functionality for Ruby".freeze
 
   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version
+
+  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
 end

In general, the files installed by ruby-core for bundled gems should be identical to the ones installed by explicit gem install.

This issue is also present in master and I'm guessing it was introduced by https://github.com/ruby/ruby/commit/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).


Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #13620: Simplifying MRI's build system: always make installOpenActions
Actions

Also available in: Atom PDF

Like3
Like0Like0Like0Like0Like0Like1Like0Like0Like0Like0Like0Like0Like0Like0