Project

General

Profile

Actions

Bug #4826

closed

Date fails RubySpec

Added by naruse (Yui NARUSE) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-06-04 trunk 31920) [x86_64-freebsd8.2]
Backport:
[ruby-dev:43624]

Description

最近の Date の変更で、以下のように RubySpec が失敗しています。
RubySpec 側を直した方がいい物もあるような気がしますが、Date 側の問題もあるようなので確認頂けますか。
spec 側を直すべきものについてはあるべき挙動を教えて頂ければそう直します。

なお、RubySpec は http://rubyspec.org/ です。
RubySpec を実行するには、git をインストールした上で、
make update-rubyspec
すると、spec/rubyspec 下に rubyspec のコードが持ってこられるので、
make test-rubyspec MSPECOPT='-V -j -f s /library/date/civil_spec.rb'
などとすれば該当のテストだけを走らせることができます。

Date#civil creats a Date for different calendar reform dates FAILED
Expected 2
to equal 20

/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:61:in block (2 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/civil_spec.rb:5:in <top (required)>'

Date#civil doesn't blow up (illegal instruction and segfault, respectively) when fed huge numbers FAILED
Expected FloatDomainError but got RangeError (float Inf out of range of integer)
/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:72:in block (4 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:71:in each'
/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:71:in block (3 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/civil_spec.rb:5:in <top (required)>'

Date#gregorian? marks a day before the calendar reform as Julian FAILED
Expected true
to equal false

/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/gregorian_spec.rb:8:in block (2 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/gregorian_spec.rb:4:in <top (required)>'

Date#gregorian? marks a day after the calendar reform as Julian FAILED
Expected false
to equal true

/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/gregorian_spec.rb:13:in block (2 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/gregorian_spec.rb:4:in <top (required)>'

Date#julian? should mark a day before the calendar reform as Julian FAILED
Expected false
to equal true

/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/julian_spec.rb:20:in block (2 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/julian_spec.rb:16:in <top (required)>'

Date#julian? should mark a day after the calendar reform as Julian FAILED
Expected true
to equal false

/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/julian_spec.rb:25:in block (2 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/julian_spec.rb:16:in <top (required)>'

Date#new creats a Date for different calendar reform dates FAILED
Expected 2
to equal 20

/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:61:in block (2 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/new_spec.rb:5:in <top (required)>'

Date#new doesn't blow up (illegal instruction and segfault, respectively) when fed huge numbers FAILED
Expected FloatDomainError but got RangeError (float Inf out of range of integer)
/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:72:in block (4 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:71:in each'
/usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/shared/civil.rb:71:in block (3 levels) in <top (required)>' /usr/home/chkbuild/build/ruby-trunk/20110604T110102Z/rubyspec/library/date/new_spec.rb:5:in <top (required)>'

Actions

Also available in: Atom PDF

Like0
Like0Like0