diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-12 16:51:14 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-12 16:51:14 +0000 |
commit | d947750eb067f092c90122366a1ee57d2c8fc808 (patch) | |
tree | 8b30ab05ad5f57d90390b6d52836bac4d3602ac9 | |
parent | 7df8b0501a9913aae81d565e3441395348ab3b36 (diff) | |
download | ruby-d947750eb067f092c90122366a1ee57d2c8fc808.tar.gz |
* lib/date.rb (Date::self.complete_hash): need to check if g is
nil before dereference. [ruby-core:09116]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/date.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Oct 13 01:48:42 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * lib/date.rb (Date::self.complete_hash): need to check if g is + nil before dereference. [ruby-core:09116] + Fri Oct 13 01:05:58 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * string.c (rb_str_partition): RDoc update. a patch from diff --git a/lib/date.rb b/lib/date.rb index dcc673bed7..1c9901534a 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 |