summaryrefslogtreecommitdiff
path: root/test/date/test_date_attr.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-10 06:31:36 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-10 06:31:36 +0000
commit9b41c2af6d609268f2a65519e46d095ba19b85c3 (patch)
tree4f76ebca7954681ebcbe817d13fbf1a0af8a3a4c /test/date/test_date_attr.rb
parent61e4c999622d7f028a15379b5cd91ad1a25c2799 (diff)
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
Diffstat (limited to 'test/date/test_date_attr.rb')
-rw-r--r--test/date/test_date_attr.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/date/test_date_attr.rb b/test/date/test_date_attr.rb
index d3bb9b9d74..b3b5d3a800 100644
--- a/test/date/test_date_attr.rb
+++ b/test/date/test_date_attr.rb
@@ -88,7 +88,6 @@ class TestDateAttr < Test::Unit::TestCase
end
def test_nth_kday
- skip unless Date.new.respond_to?(:nth_kday?, true)
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, 1,0))
assert_equal(true, Date.new(2001,1,14).__send__(:nth_kday?, 2,0))
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, 3,0))
@@ -99,6 +98,6 @@ class TestDateAttr < Test::Unit::TestCase
assert_equal(true, Date.new(2001,1,14).__send__(:nth_kday?, -3,0))
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, -4,0))
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, -5,0))
- end
+ end if Date.new.respond_to?(:nth_kday?, true)
end