Project

General

Profile

Backport #3954

Digest::Base に無引数の initialize を定義しませんか?

Added by metanest (Makoto Kishimoto) almost 9 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal

Description

=begin
背景

トランクでは r11154 より前、1.8 ブランチでは r11223 より前、リリースとしては
1.8.6 より前の Digest::(HashAlgorithm)#initialize は、ハッシュを取りたい
文字列(の先頭部分)を引数に取ることができる仕様でした。

そこに仕様の変更があり、それ以後は、SHA2 でハッシュの長さの引数を取る他は、
引数を取らなくなり、従来の、文字列を引数に指定していたスクリプトはエラーに
なるようになりました。

その後、トランクでは r26135、1.8 ブランチでは r26136 で、Object#initialize
が任意の引数を認めるように変更され( #2451 によれば Spec はそうなっている
ということですが)その結果、Digest::(HashAlgorithm)#initialize の古い書き方を
しているスクリプトがエラーにならず、しかも設定された文字列が無視されるため、
期待した結果にもならない、という状態になっています。

提案

以上を踏まえて提案なのですが、Digest に限り従来通りエラーになるように
Digest::Base に無引数の initialize を定義しませんか?
(1.9に登録しますが、1.8にもバックポートを希望します)
=end

Associated revisions

Revision 74cacd0d
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 29528
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Revision 29528
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Revision 29528
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Revision 29528
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Revision 29528
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Revision 29528
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Revision 29528
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Revision 598566fc
Added by knu (Akinori MUSHA) almost 9 years ago

  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@29656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

#1

Updated by knu (Akinori MUSHA) almost 9 years ago

  • Status changed from Open to Assigned
  • Assignee set to knu (Akinori MUSHA)

=begin

=end

#2

Updated by knu (Akinori MUSHA) almost 9 years ago

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

=begin
This issue was solved with changeset r29528.
Makoto, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

#3

Updated by knu (Akinori MUSHA) almost 9 years ago

  • Category set to ext
  • Status changed from Closed to Assigned
  • Target version set to Ruby 1.8.8

=begin

=end

#4

Updated by knu (Akinori MUSHA) almost 9 years ago

  • Status changed from Assigned to Closed

=begin
This issue was solved with changeset r29656.
Makoto, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

#5

Updated by shyouhei (Shyouhei Urabe) almost 9 years ago

=begin
確認ですがこれはバグなんでしょうか仕様変更でしょうか。つまり、1.8.7はどうすべき?
=end

#6

Updated by knu (Akinori MUSHA) almost 9 years ago

=begin
1.8.7には入れなくていいと思います。

ただ、私は今1.8.7先端を試せないのですがもし ruby-1.8.7 -rdigest -e 'Digest::Base.new' でコアを吐くようなら入れてください。(1.9.2は出るので要修正です)
=end

#7

Updated by knu (Akinori MUSHA) almost 9 years ago

  • Status changed from Closed to Assigned

=begin
r29528 はまだ1.9.2にbackportされていないようですね。 #note-6 のコードで死ぬと思うのでbackportが必要です。
=end

#8

Updated by knu (Akinori MUSHA) almost 9 years ago

  • Assignee changed from knu (Akinori MUSHA) to yugui (Yuki Sonoda)
  • Priority changed from 3 to Normal

=begin

=end

#9

Updated by shyouhei (Shyouhei Urabe) almost 9 years ago

  • Assignee changed from yugui (Yuki Sonoda) to knu (Akinori MUSHA)
  • Priority changed from Normal to 3

=begin
1.8.7は死にませんでしたのでバックポートしないことに決めました。
=end

#10

Updated by shyouhei (Shyouhei Urabe) almost 9 years ago

  • Assignee changed from knu (Akinori MUSHA) to yugui (Yuki Sonoda)
  • Priority changed from 3 to Normal

=begin

=end

#11

Updated by knu (Akinori MUSHA) almost 8 years ago

  • Status changed from Assigned to Closed

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


  • ext/digest/digest.c (rb_digest_class_init): Define Digest::Class.new(). [Feature #3954]

Also available in: Atom PDF