1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
tadf 2010-09-12 12:24:17 +00:00
parent 5cc5e1c5be
commit d50b19ff27
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Sun Sep 12 21:21:50 2010 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date.rb: [ruby-core:32096] Thanks Colin Bartlett.
Sun Sep 12 19:30:27 2010 Tanaka Akira <akr@fsij.org>
* ext/pathname/pathname.c (path_world_writable_p):

View file

@ -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