Project

General

Profile

Actions

Bug #7850

closed

Gem::Dependency.new( Symbol ) is deprecated?

Added by konh (Makoto HARADA) almost 12 years ago. Updated almost 12 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
ruby -v:
ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin12.2.0]
Backport:
[ruby-dev:46980]

Description

Gem::Dependency.new の第一引数が Symbol だった場合、1.9だと問題ありませんが2.0だと例外が投げられます。
これは、想定された非互換でしょうか?

以下が再現コードです。

$ ruby2.0 -v -e 'Gem::Dependency.new(:hoge)'
ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin12.2.0]
/***/2.0.0-rc2/lib/ruby/2.0.0/rubygems/dependency.rb:45:in initialize': dependency name must be a String, was :hoge (ArgumentError) from -e:1:in new'
from -e:1:in `'

$ ruby1.9 -v -e 'Gem::Dependency.new(:hoge)'
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-darwin12.2.0]

具体的には、Hoe ( Hoe.plugin ) がこの非互換を踏んでいてひっかかりました。

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0