summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-12 16:51:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-12 16:51:14 +0000
commit0375a15bdca3f7a4ecfb1bf502cb8af2d9287eb0 (patch)
tree8b30ab05ad5f57d90390b6d52836bac4d3602ac9 /lib
parent955e9538b3a0600713869d7ddb790986e706c2c1 (diff)
downloadruby-0375a15bdca3f7a4ecfb1bf502cb8af2d9287eb0.tar.gz
ruby-0375a15bdca3f7a4ecfb1bf502cb8af2d9287eb0.tar.xz
ruby-0375a15bdca3f7a4ecfb1bf502cb8af2d9287eb0.zip
* lib/date.rb (Date::self.complete_hash): need to check if g is
nil before dereference. [ruby-core:09116] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/date.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/date.rb b/lib/date.rb
index dcc673bed..1c9901534 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -797,7 +797,7 @@ class Date
end
end
- if g[0] == :time
+ if g && g[0] == :time
if self <= DateTime
d ||= Date.today
elem[:jd] ||= d.jd