Permalink
Browse files

Fix undefining today if already undefined, bump version to 0.9.3

  • Loading branch information...
jeremyevans committed Sep 20, 2010
1 parent d4a389f commit 72e958add9f03ba0b4dc9d27144a9642039d9ec2
Showing with 8 additions and 2 deletions.
  1. +4 −0 CHANGELOG
  2. +3 −1 ext/date_ext/datetime.c
  3. +1 −1 home_run.gemspec
View
@@ -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)
View
@@ -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);
View
@@ -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"]

0 comments on commit 72e958a

Please sign in to comment.