Project

General

Profile

This project is closed and read-only.

Actions

Backport #3954

closed

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

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

Added by metanest (Makoto Kishimoto) almost 16 years ago. Updated about 15 years ago.

Status:
Closed

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

Updated by knu (Akinori MUSHA) almost 16 years ago Actions #1

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

=begin

=end

Updated by knu (Akinori MUSHA) almost 16 years ago Actions #2

  • 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

Updated by knu (Akinori MUSHA) almost 16 years ago Actions #3

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

=begin

=end

Updated by knu (Akinori MUSHA) almost 16 years ago Actions #4

  • 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

Updated by shyouhei (Shyouhei Urabe) almost 16 years ago Actions #5

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

Updated by knu (Akinori MUSHA) almost 16 years ago Actions #6

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

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

Updated by knu (Akinori MUSHA) almost 16 years ago Actions #7

  • Status changed from Closed to Assigned

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

Updated by knu (Akinori MUSHA) almost 16 years ago Actions #8

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

=begin

=end

Updated by shyouhei (Shyouhei Urabe) almost 16 years ago Actions #9

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

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

Updated by shyouhei (Shyouhei Urabe) almost 16 years ago Actions #10

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

=begin

=end

Updated by knu (Akinori MUSHA) about 15 years ago Actions #11

  • 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]
Actions

Also available in: PDF Atom