aboutsummaryrefslogtreecommitdiffstats
path: root/test/date/test_date_new.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/date] introduce Date::Error, raise Date::Error for everyglaszig2019-10-311-12/+12
| | | | | | "invalid <anything>" type of exception https://github.com/ruby/date/commit/3e55c09ba4
* Fix typo causing Date.new(year, month) to failJeremy Evans2019-10-241-0/+4
| | | | Add a test for this case.
* [ruby/date] Check for numeric arguments in constructorsJeremy Evans2019-10-241-0/+50
| | | | | | | | | | | | | | | 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
* test/date: removed unnecessaruy `__send__`nobu2018-12-111-12/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: keep COMPLEX_DAT bitnobu2018-11-131-0/+8
| | | | | | | | * 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
* Do not define test method instead of skip when Calendar class is not defined.hsbt2017-11-101-4/+2
| | | | | | | 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
* {ext,test}/date: Specify frozen_string_literal: true.kazu2017-01-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | 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
* * reverted 34739 for test/date.tadf2012-02-221-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/date, test/rdoc: exclude tests dependent on unbundled libraries.nobu2012-02-221-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c: use simple/complex mode instead of light/right mode.tadf2011-05-311-9/+0
| | | | | | | * test/date/*.rb: followed the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_{complex2,complexrational}.rb: use skip.tadf2011-05-081-4/+2
| | | | | | | * test/date/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/date/*.rb: NEVER SKIP.tadf2011-05-081-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/date/*.rb: reverted 31432.tadf2011-05-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/date/*.rb: reverted 31483.tadf2011-05-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r31478.naruse2011-05-081-2/+2
| | | | | | | | 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
* * test/date/*.rb: use skip /w messages.tadf2011-05-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c: modified validation methods.tadf2011-04-261-0/+2
| | | | | | | | * ext/date/lib/date.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixed previous commit.tadf2008-09-291-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/date/*.rb: imported a date test suite ruby 1.9 limited ed.tadf2008-09-281-0/+276
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e