Граф коммитов

20 Коммитов

Автор SHA1 Сообщение Дата
glaszig fce940aac7 [ruby/date] introduce Date::Error, raise Date::Error for every
"invalid <anything>" type of exception

https://github.com/ruby/date/commit/3e55c09ba4
2019-10-31 15:51:25 +09:00
Jeremy Evans 5fe8943fda Fix typo causing Date.new(year, month) to fail
Add a test for this case.
2019-10-24 12:34:51 -07:00
Jeremy Evans 4e40ca301c
[ruby/date] Check for numeric arguments in constructors
Previously, the type of these arguments were not checked, leading to
NoMethodErrors in some cases, and TypeErrors in other cases, but not
showing what field was having the problems.  This change makes it so
the field with the problem is included in the error message.

For the valid_*? methods, this changes them to return false if one
of the arguments that should be numeric is not.

Fixes Ruby Bug 11935
Fixes Ruby Misc 15298

https://github.com/ruby/date/commit/a2f4b665f8
2019-10-24 18:39:04 +09:00
nobu 8c69f7ec44 test/date: removed unnecessaruy `__send__`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 05:09:35 +00:00
nobu 8655d0735f date_core.c: keep COMPLEX_DAT bit
* ext/date/date_core.c (d_lite_initialize_copy): do not change
  COMPLEX_DAT bit, as the structure does not change.  initialize
  member-wise instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13 04:29:30 +00:00
hsbt 9b41c2af6d Do not define test method instead of skip when Calendar class is not defined.
Revisit r34739. Patch by MSP-Greg.
  [Bug #14088][ruby-core:83690][fix GH-1743]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-10 06:31:36 +00:00
kazu 8edb6ce4f7 {ext,test}/date: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27 00:29:21 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
tadf 8cd604c6c7 * reverted 34739 for test/date.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 10:23:23 +00:00
nobu b67bc8d722 * test/date, test/rdoc: exclude tests dependent on unbundled libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 09:34:59 +00:00
tadf 899d2c14b0 * ext/date/date_core.c: use simple/complex mode instead of light/right mode.
* test/date/*.rb: followed the above changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 13:28:48 +00:00
tadf 10c4a861eb * test/ruby/test_{complex2,complexrational}.rb: use skip.
* test/date/*.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 13:18:47 +00:00
tadf a4ecf14d58 * test/date/*.rb: NEVER SKIP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:56:32 +00:00
tadf 5518dc64cf * test/date/*.rb: reverted 31432.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:38:25 +00:00
tadf dbe8aba7f9 * test/date/*.rb: reverted 31483.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:33:41 +00:00
naruse bf92aa8b16 Revert r31478.
In CRuby's test-all, skip is for something to be fixed.
When some external library is missing, it should silently return;
don't flood the test result with meaningless messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:15:23 +00:00
tadf 847b461452 * test/date/*.rb: use skip /w messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 08:18:10 +00:00
tadf 9fe4a35e67 * ext/date/date_core.c: modified validation methods.
* ext/date/lib/date.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 16:02:25 +00:00
tadf 9d2f9f26e8 fixed previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-29 11:53:59 +00:00
tadf 0e395a6002 * test/date/*.rb: imported a date test suite ruby 1.9 limited ed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28 10:06:13 +00:00