Bug #5032

Gem::Specification#loaded? が常に false を返す

Added by okkez _ almost 3 years ago. Updated over 2 years ago.

[ruby-dev:44117]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
Category:lib
Target version:1.9.3
ruby -v:1.9.3 Backport:

Description

1.9.3 の RubyGems で Gem::Specification#loaded? が deprecated になったのですが、
常に false を返すようです。かわりに使えと言われる Gem::Specification#activated? は gemspec がロードできているときは
ちゃんと true を返してくれます。

rabbit の 1.0.0 では Gem::Specification#loaded? を使っているので新しい RubyGems を使うとちゃんと動きません。

Associated revisions

Revision 32652
Added by Eric Hodel over 2 years ago

  • lib/rubygems/specification.rb: Restore behavior of Gem::Specification#loaded. [Ruby 1.9 - Bug #5032]

History

#1 Updated by Yui NARUSE almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Ryan Davis

TITLE: Gem::Specification#loaded? always returns false

BODY:

On 1.9.3 RubyGems deprecates Gem::Specification#loaded? and always returns false.
It says to use Gem::Specification#activated? and it returns true when gemspec is loaded.

rabbit 1.0.0. uses Gem::Specification#loaded? and doesn't work with latest RubyGems.
(so they released rabbit 1.0.1)

#2 Updated by Eric Hodel almost 3 years ago

  • Assignee changed from Ryan Davis to Eric Hodel

#3 Updated by Eric Hodel over 2 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32652.
okkez, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/rubygems/specification.rb: Restore behavior of Gem::Specification#loaded. [Ruby 1.9 - Bug #5032]

Also available in: Atom PDF