summaryrefslogtreecommitdiff
path: root/lib/date.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-12 12:24:17 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-12 12:24:17 +0000
commitd50b19ff275aa3332c1b99f857e15f49ca4d39d3 (patch)
tree9662874e99b27b3323527658dc91882eab9fdc97 /lib/date.rb
parent5cc5e1c5beed714998d46209d439e3b9674178a8 (diff)
* lib/date.rb: [ruby-core:32096] Thanks Colin Bartlett.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date.rb')
-rw-r--r--lib/date.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/date.rb b/lib/date.rb
index 8b1796201c..37c4b92d48 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -589,7 +589,7 @@ class Date
# +sg+ specifies the Day of Calendar Reform.
def _valid_ordinal? (y, d, sg=GREGORIAN) # :nodoc:
if d < 0
- j = find_ldoy(y, sg)
+ return unless j = find_ldoy(y, sg)
ny, nd = jd_to_ordinal(j + d + 1, sg)
return unless ny == y
d = nd
@@ -616,7 +616,7 @@ class Date
m += 13
end
if d < 0
- j = find_ldom(y, m, sg)
+ return unless j = find_ldom(y, m, sg)
ny, nm, nd = jd_to_civil(j + d + 1, sg)
return unless [ny, nm] == [y, m]
d = nd