Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Fix undefining today if already undefined, bump version to 0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Sep 20, 2010
1 parent d4a389f commit 72e958a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,3 +1,7 @@
=== 0.9.3 (2010-09-20)

* Don't attempt to undefine already undefined method if you require date_ext twice with two different paths (jeremyevans)

=== 0.9.2 (2010-09-13)

* Make DateTime#sec_fraction on ruby 1.9 to be compatible with 1.9 stdlib (jeremyevans)
Expand Down
4 changes: 3 additions & 1 deletion ext/date_ext/datetime.c
Expand Up @@ -2744,7 +2744,9 @@ void Init_datetime(void) {

/* Define methods for all ruby versions*/

rb_undef(rhrdt_s_class, rb_intern("today"));
if(rb_respond_to(rhrdt_class, rb_intern("today"))) {
rb_undef(rhrdt_s_class, rb_intern("today"));
}
rb_define_method(rhrdt_s_class, "_load", rhrdt_s__load, 1);
rb_define_method(rhrdt_s_class, "_strptime", rhrdt_s__strptime, -1);
rb_define_method(rhrdt_s_class, "civil", rhrdt_s_civil, -1);
Expand Down
2 changes: 1 addition & 1 deletion home_run.gemspec
@@ -1,6 +1,6 @@
HOME_RUN_GEMSPEC = Gem::Specification.new do |s|
s.name = 'home_run'
s.version = '0.9.2'
s.version = '0.9.3'
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "LICENSE"]
Expand Down

0 comments on commit 72e958a

Please sign in to comment.